Implement shift+<key> support, and ...
[lunaix-os.git] / lunaix-os / includes / lunaix / spike.h
index 7e50693bc6fa37e77467078ceb63505c422d121b..8fd47b59b710d766afa0dc78429ca564bde2737d 100644 (file)
@@ -24,11 +24,22 @@ inline static void spin() {
     if (!(cond)) {                                    \
         __assert_fail(#cond, __FILE__, __LINE__);     \
     }
+
+#define assert_msg(cond, msg)                         \
+    if (!(cond)) {                                    \
+        __assert_fail(msg, __FILE__, __LINE__);       \
+    }
 void __assert_fail(const char* expr, const char* file, unsigned int line) __attribute__((noinline, noreturn));
 #else
-#define assert(cond) //nothing
+#define assert(cond) (void)(cond); //assert nothing
+#define assert_msg(cond, msg) (void)(cond);  //assert nothing
 #endif
 
+void panick(const char* msg);
+
+
+#define wait_until(cond)    while(!(cond));
+#define loop_until(cond)    while(!(cond));
 
 
 #endif /* __LUNAIX_SPIKE_H */