1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

Start work on a standard C library. I'm calling it... LibC.

This commit is contained in:
Andreas Kling 2018-10-22 13:57:25 +02:00
parent 85bcf2ed0f
commit 4cbf079a17
8 changed files with 311 additions and 0 deletions

22
LibC/unistd.cpp Normal file
View file

@ -0,0 +1,22 @@
#include "unistd.h"
#include <Kernel/Syscall.h>
extern "C" {
uid_t getuid()
{
return Syscall::invoke(Syscall::PosixGetuid);
}
uid_t getgid()
{
return Syscall::invoke(Syscall::PosixGetgid);
}
uid_t getpid()
{
return Syscall::invoke(Syscall::PosixGetpid);
}
}