mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 12:16:31 +00:00
new: mstat()函数,查询内存信息
This commit is contained in:
@ -18,6 +18,7 @@ extern void system_call(void);
|
||||
extern void syscall_int(void);
|
||||
|
||||
extern uint64_t sys_clock(struct pt_regs *regs);
|
||||
extern uint64_t sys_mstat(struct pt_regs *regs);
|
||||
|
||||
/**
|
||||
* @brief 导出系统调用处理函数的符号
|
||||
@ -778,5 +779,7 @@ system_call_t system_call_table[MAX_SYSTEM_CALL_NUM] =
|
||||
[17] = sys_mkdir,
|
||||
[18] = sys_nanosleep,
|
||||
[19] = sys_clock,
|
||||
[20 ... 254] = system_call_not_exists,
|
||||
[20] = system_call_not_exists,
|
||||
[21] = sys_mstat,
|
||||
[22 ... 254] = system_call_not_exists,
|
||||
[255] = sys_ahci_end_req};
|
||||
|
@ -30,5 +30,9 @@
|
||||
#define SYS_MKDIR 17 // 创建文件夹
|
||||
#define SYS_NANOSLEEP 18 // 纳秒级休眠
|
||||
#define SYS_CLOCK 19 // 获取当前cpu时间
|
||||
#define SYS_PIPE 20
|
||||
|
||||
#define SYS_MSTAT 21 // 获取系统的内存状态信息
|
||||
|
||||
|
||||
#define SYS_AHCI_END_REQ 255 // AHCI DMA请求结束end_request的系统调用
|
Reference in New Issue
Block a user