diff --git a/libs/libc/include/unistd.h b/libs/libc/include/unistd.h index 8226a74a..e763f171 100644 --- a/libs/libc/include/unistd.h +++ b/libs/libc/include/unistd.h @@ -8,16 +8,29 @@ extern "C" { #endif + /* Not implemented. */ int execv(const char*, char* const[]); + /* Not implemented. */ int execve(const char*, char* const[], char* const[]); + /* Not implemented. */ int execvp(const char*, char* const[]); + /* Not implemented. */ pid_t fork(void); - long syscall(long, ...); - unsigned int sleep(unsigned int); - ssize_t read(int, void*, size_t); - ssize_t write(int, const void*, size_t); - int close(int); + /* Calls the kernel for a specific service, determined by number. */ + long syscall(long number, ...); + + /* Suspends execution for a chosen amount of seconds. */ + unsigned int sleep(unsigned int seconds); + + /* Reads count bytes from the file descriptor fd into the memory at buf. */ + ssize_t read(int fd, void* buf, size_t count); + + /* Writes count bytes of the memory at buf to the file descriptor fd. */ + ssize_t write(int fd, const void* buf, size_t count); + + /* Closes the file descriptor fd. */ + int close(int fd); #ifdef __cplusplus }