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
Merge branch 'master' into prog-loader
[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 d9c234d495608bebfd58fc6d35a25f73f338b230..91c92fcaa47bdc597ddffe89ff46337be6fc0f56 100644
(file)
--- a/
lunaix-os/includes/lunaix/spike.h
+++ b/
lunaix-os/includes/lunaix/spike.h
@@
-11,7
+11,7
@@
// 除法 v/(2^k) 向下取整
#define FLOOR(v, k) ((v) >> (k))
// 除法 v/(2^k) 向下取整
#define FLOOR(v, k) ((v) >> (k))
-// 获取v最近的最大k倍数
+// 获取v最近的最大k倍数
(k=2^n)
#define ROUNDUP(v, k) (((v) + (k)-1) & ~((k)-1))
// 获取v最近的最小k倍数 (k=2^m)
#define ROUNDUP(v, k) (((v) + (k)-1) & ~((k)-1))
// 获取v最近的最小k倍数 (k=2^m)
@@
-71,7
+71,7
@@
spin()
;
}
;
}
-#if
def __LUNAIXOS_DEBUG
__
+#if
ndef __LUNAIXOS_NASSERT
__
#define assert(cond) \
if (!(cond)) { \
__assert_fail(#cond, __FILE__, __LINE__); \
#define assert(cond) \
if (!(cond)) { \
__assert_fail(#cond, __FILE__, __LINE__); \
@@
-87,7
+87,8
@@
__assert_fail(const char* expr, const char* file, unsigned int line)
#else
#define assert(cond) (void)(cond); // assert nothing
#define assert_msg(cond, msg) (void)(cond); // assert nothing
#else
#define assert(cond) (void)(cond); // assert nothing
#define assert_msg(cond, msg) (void)(cond); // assert nothing
-#endif
+
+#endif // __LUNAIXOS_NASSERT__
void
panick(const char* msg);
void
panick(const char* msg);