1 #include "stat.h"
2 #include <libsystem/syscall.h>
3
mkdir(const char * path,mode_t mode)4 int mkdir(const char *path, mode_t mode)
5 {
6 return syscall_invoke(SYS_MKDIR, (uint64_t)path, (uint64_t)mode, 0, 0, 0, 0, 0, 0);
7 }
8
9 /**
10 * @brief 获取系统的内存信息
11 *
12 * @param stat 传入的内存信息结构体
13 * @return int 错误码
14 */
mstat(struct mstat_t * stat)15 int mstat(struct mstat_t *stat)
16 {
17 return syscall_invoke(SYS_MSTAT, (uint64_t)stat, 0, 0, 0, 0, 0, 0, 0);
18 }
19
pipe(int * fd)20 int pipe(int *fd)
21 {
22 return syscall_invoke(SYS_PIPE, (uint64_t)fd, 0, 0,0,0,0,0,0);
23 }