// 获取v最近的最小k倍数
#define ROUNDDOWN(v, k) ((v) & ~((k)-1))
-#define __USER__ __attribute__((section("usrtext")))
+#define __USER__ __attribute__((section(".usrtext")))
inline static void
spin()
while (!(cond)) \
;
+#define wait_until_expire(cond, max) \
+ ({ \
+ unsigned int __wcounter__ = (max); \
+ while (!(cond) && __wcounter__-- > 0) \
+ ; \
+ __wcounter__; \
+ })
+
#endif /* __LUNAIX_SPIKE_H */