git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: device subsystem rework
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
spike.h
diff --git
a/lunaix-os/includes/lunaix/spike.h
b/lunaix-os/includes/lunaix/spike.h
index ae193570f2b3bfaeb0af329d4e17f9ae94adb26e..a2a0e21d5f66c1c56e33e2947306fb930d78ca2e 100644
(file)
--- a/
lunaix-os/includes/lunaix/spike.h
+++ b/
lunaix-os/includes/lunaix/spike.h
@@
-64,14
+64,13
@@
: 0) \
: (31 - __builtin_clz(x)))
: 0) \
: (31 - __builtin_clz(x)))
-#define DO_SPIN \
- while (1) \
- ;
-
-inline static void
+inline static void noret
spin()
{
spin()
{
- DO_SPIN
+ volatile int __infloop = 1;
+ while (__infloop)
+ ;
+ __builtin_unreachable();
}
#ifndef __LUNAIXOS_NASSERT__
}
#ifndef __LUNAIXOS_NASSERT__
@@
-94,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
#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);
void noret
panick(const char* msg);