Kernel/LibC: Add syscall and wrapper for unlink

This commit is contained in:
2023-10-25 21:45:04 +03:00
parent b7007016c0
commit 87ff38664a
5 changed files with 31 additions and 1 deletions

View File

@@ -58,6 +58,7 @@ __BEGIN_DECLS
#define SYS_CHMOD 55
#define SYS_CREATE 56 // creat, mkfifo
#define SYS_CREATE_DIR 57 // mkdir
#define SYS_UNLINK 58
__END_DECLS

View File

@@ -210,6 +210,11 @@ void syncsync(int should_block)
syscall(SYS_SYNC, should_block);
}
int unlink(const char* path)
{
return syscall(SYS_UNLINK, path);
}
pid_t getpid(void)
{
return syscall(SYS_GET_PID);