X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/7b8a1bcad75628f9add4590db2bb9b8e418ee8eb..b60166b327a9108b07e3069fa6568a451529ffd9:/lunaix-os/includes/lunaix/compiler.h diff --git a/lunaix-os/includes/lunaix/compiler.h b/lunaix-os/includes/lunaix/compiler.h index 7581978..c3eab58 100644 --- a/lunaix-os/includes/lunaix/compiler.h +++ b/lunaix-os/includes/lunaix/compiler.h @@ -10,6 +10,7 @@ #define optimize(opt) __attribute__((optimize(opt))) #define must_inline __attribute__((always_inline)) #define must_emit __attribute__((used)) +#define unreachable __builtin_unreachable() #define clz(bits) __builtin_clz(bits) #define sadd_overflow(a, b, of) __builtin_sadd_overflow(a, b, of) @@ -25,8 +26,8 @@ #define compact __attribute__((packed)) #define align(v) __attribute__((aligned (v))) -#define export_symbol(domain, symbol)\ - typeof(symbol)* must_emit __SYMEXPORT_Z##domain##_##symbol = &(symbol) +#define export_symbol(domain, namespace, symbol)\ + typeof(symbol)* must_emit __SYMEXPORT_Z##domain##_N##namespace##_S##symbol = &(symbol) inline static void noret spin() @@ -34,7 +35,7 @@ spin() volatile int __infloop = 1; while (__infloop) ; - __builtin_unreachable(); + unreachable; } #endif /* __LUNAIX_COMPILER_H */