Draft: lab 3 irq wtf

This commit is contained in:
2025-03-24 10:48:35 +08:00
parent 9d19b8b3b6
commit 98327b148a
19 changed files with 386 additions and 142 deletions

View File

@@ -6,3 +6,5 @@
#define ERR_OUT_OF_BOUND 0x00000004
#define ERR_INVALID_OP 0x00000005
#define ERR_INVALID_MEM 0x00000006
#define ERR_NOT_EXIST 0x00000007
#define ERR_ADMINKILL 0x00114514

View File

@@ -70,7 +70,7 @@ logger_cur = _Generic((msg), \
FLUSH("[ERROR]: "); \
}
#else
#define ERROR(val)
#define ERROR(val) CLEAN
#endif
#if LOGLEVEL >= 1
@@ -79,7 +79,7 @@ logger_cur = _Generic((msg), \
FLUSH("[INFOR]: "); \
}
#else
#define INFOR(val)
#define INFOR(val) CLEAN
#endif
#if LOGLEVEL >= 2
@@ -87,14 +87,21 @@ logger_cur = _Generic((msg), \
LOG(val); \
FLUSH("[DEBUG]: "); \
}
#define DEBUG_DTB(val) DEBUG(val)
#else // #if LOGLEVEL >= 2
#define DEBUG(val) CLEAN
#endif // #if LOGLEVEL >= 2
// #define DEBUG_DTB(val) DEBUG(val)
#define DEBUG_DTB(val) CLEAN
#define DEBUG_EXCEP(val) DEBUG(val)
// #define DEBUG_EXCEP(val) CLEAN
// #define DEBUG_MEM(val) DEBUG(val)
#define DEBUG_MEM(val) CLEAN
#else // #if LOGLEVEL >= 2
#define DEBUG(val)
#define DEBUG_DTB(val)
#define DEBUG_MEM(val)
#endif // #if LOGLEVEL >= 2
// #define DEBUG_INITRD(val) DEBUG(val)
#define DEBUG_INITRD(val) CLEAN
extern char logger_buf[LOGGER_BUFLEN];
extern char *logger_cur;