Files

33 lines
753 B
C
Raw Permalink Normal View History

2026-04-30 20:30:36 +01:00
#ifndef MAGENTA_X86_64_INIT_H_
#define MAGENTA_X86_64_INIT_H_
#include <stddef.h>
#include <stdint.h>
2023-03-20 20:41:39 +00:00
#ifdef __cplusplus
extern "C" {
#endif
#define __X2(x) #x
2026-02-08 12:17:27 +00:00
#define __X(x) __X2(x)
#ifdef __APPLE__
2026-02-08 12:17:27 +00:00
#define __define_initcall(fn, id) \
static initcall_t __initcall_##fn##id __used __section( \
"__DATA,__initcall" __X(id) ".init") \
= (fn)
#else
2026-02-08 12:17:27 +00:00
#define __define_initcall(fn, id) \
static initcall_t __initcall_##fn##id __used __section( \
"initcall" __X(id) "_init") \
= (fn)
#endif
extern int ml_init(uintptr_t arg);
2023-03-20 20:41:39 +00:00
#ifdef __cplusplus
}
#endif
#endif