refactor: clean up the virtual memory mappings
[lunaix-os.git] / lunaix-os / includes / lunaix / spike.h
index 4e17993266adbf0e96971a034c39f4517d723cad..274bcf63f670efdb009de2509ccc11b5de76b2b9 100644 (file)
@@ -3,12 +3,12 @@
 
 // Some helper functions. As helpful as Spike the Dragon! :)
 
-// 除法向上取整
+// 除法 v/(2^k) 向上取整
 #define CEIL(v, k) (((v) + (1 << (k)) - 1) >> (k))
 
 #define ICEIL(x, y) ((x) / (y) + ((x) % (y) != 0))
 
-// 除法向下取整
+// 除法 v/(2^k) 向下取整
 #define FLOOR(v, k) ((v) >> (k))
 
 // 获取v最近的最大k倍数
@@ -92,6 +92,9 @@ __assert_fail(const char* expr, const char* file, unsigned int line)
 void
 panick(const char* msg);
 
+void
+panickf(const char* fmt, ...);
+
 #define wait_until(cond)                                                       \
     while (!(cond))                                                            \
         ;