Files
mango/arch/user/include/socks/machine/init.h

30 lines
535 B
C
Raw Normal View History

#ifndef SOCKS_X86_64_INIT_H_
#define SOCKS_X86_64_INIT_H_
#include <stdint.h>
2023-03-20 20:41:39 +00:00
#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);
2023-03-20 20:41:39 +00:00
#ifdef __cplusplus
}
#endif
#endif