2022-06-25 12:55:59 +00:00
|
|
|
#include "stat.h"
|
2022-08-06 15:31:25 +00:00
|
|
|
#include <libsystem/syscall.h>
|
2022-06-25 12:55:59 +00:00
|
|
|
|
|
|
|
|
int mkdir(const char *path, mode_t mode)
|
|
|
|
|
{
|
2022-08-06 15:31:25 +00:00
|
|
|
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);
|
2022-08-20 13:47:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int pipe(int *fd)
|
|
|
|
|
{
|
|
|
|
|
return syscall_invoke(SYS_PIPE, (uint64_t)fd, 0, 0,0,0,0,0,0);
|
2022-06-25 12:55:59 +00:00
|
|
|
}
|