new: mstat()函数,查询内存信息

This commit is contained in:
fslongjin
2022-08-06 23:31:25 +08:00
parent fdd5d3cf66
commit fb51b0dd6f
8 changed files with 270 additions and 7 deletions

View File

@ -1,7 +1,18 @@
#include "stat.h"
#include<libsystem/syscall.h>
#include <libsystem/syscall.h>
int mkdir(const char *path, mode_t mode)
{
return syscall_invoke(SYS_MKDIR, (uint64_t)path, (uint64_t)mode, 0,0,0,0,0,0);
return syscall_invoke(SYS_MKDIR, (uint64_t)path, (uint64_t)mode, 0, 0, 0, 0, 0, 0);
}
/**
* @brief 获取系统的内存信息
*
* @param stat 传入的内存信息结构体
* @return int 错误码
*/
int mstat(struct mstat_t *stat)
{
return syscall_invoke(SYS_MSTAT, (uint64_t)stat, 0, 0, 0, 0, 0, 0, 0);
}