X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/b632f535c4a6882bdca0317fb88cbe6e165f24eb..81ecfb6240fdd3a8229f0740242612212e062a6c:/lunaix-os/includes/lunaix/spike.h?ds=sidebyside diff --git a/lunaix-os/includes/lunaix/spike.h b/lunaix-os/includes/lunaix/spike.h index 356e4b3..a2a0e21 100644 --- a/lunaix-os/includes/lunaix/spike.h +++ b/lunaix-os/includes/lunaix/spike.h @@ -64,17 +64,13 @@ : 0) \ : (31 - __builtin_clz(x))) -#define DO_SPIN \ - { \ - volatile int __infloop = 1; \ - while (__infloop) \ - ; \ - } - inline static void noret spin() { - DO_SPIN + volatile int __infloop = 1; + while (__infloop) + ; + __builtin_unreachable(); } #ifndef __LUNAIXOS_NASSERT__ @@ -97,7 +93,7 @@ __assert_fail(const char* expr, const char* file, unsigned int line) #define assert(cond) (void)(cond); // assert nothing #define assert_msg(cond, msg) (void)(cond); // assert nothing -#endif // __LUNAIXOS_NASSERT__ +#endif // __LUNAIXOS_NASSERT__ void noret panick(const char* msg);