Draft: start lab 3

This commit is contained in:
2025-03-23 11:21:31 +08:00
parent a6dc454a4c
commit 6156975775
5 changed files with 122 additions and 1 deletions

View File

@@ -60,6 +60,10 @@ logger_cur = _Generic((msg), \
logger_cur = logger_buf; \
}
#define CLEAN { \
logger_cur = logger_buf; \
}
#if LOGLEVEL >= 0
#define ERROR(val) { \
LOG(val); \
@@ -84,7 +88,8 @@ logger_cur = _Generic((msg), \
FLUSH("[DEBUG]: "); \
}
#define DEBUG_DTB(val) DEBUG(val)
#define DEBUG_MEM(val) DEBUG(val)
// #define DEBUG_MEM(val) DEBUG(val)
#define DEBUG_MEM(val) CLEAN
#else // #if LOGLEVEL >= 2
#define DEBUG(val)
#define DEBUG_DTB(val)