little fix

This commit is contained in:
TXuian
2024-12-23 22:40:54 +08:00
parent 3d43cb9644
commit 7639937678
22 changed files with 1091 additions and 26 deletions
@@ -35,7 +35,7 @@ Modification:
#include <stdbool.h>
#include <stdint.h>
#define MAX_BUDDY_ORDER (14)
#define MAX_BUDDY_ORDER (18)
#define FREE_LIST_INDEX(order) \
(1 << order)
+14 -1
View File
@@ -35,6 +35,8 @@ Modification:
#define OUTPUT_LEVLE_DEBUG 1
#define OUTPUT_LEVLE_ERROR 2
#define OUTPUT_LEVEL_TEST 3
#define OUTPUT_LEVLE OUTPUT_LEVLE_DEBUG
// #define OUTPUT_LEVLE OUTPUT_LEVLE_LOG
@@ -56,10 +58,21 @@ Modification:
#define DEBUG_PRINTF(f, args...)
#endif
#define DEBUG(f, args...) \
#if (OUTPUT_LEVLE >= OUTPUT_LEVLE_TEST)
#define RECORD_PRINTF(f, args...) \
KPrintf(f, ##args)
#else
#define RECORD_PRINTF(f, args...)
#endif
#define DEBUG(f, args...) \
DEBUG_PRINTF("DEBUG: [%s] ", __func__); \
DEBUG_PRINTF(f, ##args)
#define RECORD(f, args...) \
RECORD_PRINTF("DEBUG: [%s] ", __func__); \
RECORD_PRINTF(f, ##args)
#define ERROR(f, args...) \
KPrintf("ERROR: [%s %d] ", __func__, __LINE__); \
KPrintf(f, ##args)
@@ -39,7 +39,7 @@ int syscall(int sys_num, uintptr_t param1, uintptr_t param2, uintptr_t param3, u
switch (sys_num) {
case SYSCALL_TEST:
ret = 0;
ret = arch_curr_tick();
break;
case SYSCALL_SPAWN:
ret = sys_spawn((char*)param1, (char*)param2, (char**)param3);