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:
parent
85bcf2ed0f
commit
4cbf079a17
8 changed files with 311 additions and 0 deletions
22
LibC/unistd.cpp
Normal file
22
LibC/unistd.cpp
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue