#ifndef MANGO_X86_64_INIT_H_ #define MANGO_X86_64_INIT_H_ #include #include #ifdef __cplusplus extern "C" { #endif #define __X2(x) #x #define __X(x) __X2(x) #ifdef __APPLE__ #define __define_initcall(fn, id) \ static initcall_t __initcall_##fn##id __used __section( \ "__DATA,__initcall" __X(id) ".init") \ = (fn) #else #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); #ifdef __cplusplus } #endif #endif