diff options
Diffstat (limited to 'src/lib/libc/include/unistd.h')
-rw-r--r-- | src/lib/libc/include/unistd.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/libc/include/unistd.h b/src/lib/libc/include/unistd.h index fa7f951..b668d5b 100644 --- a/src/lib/libc/include/unistd.h +++ b/src/lib/libc/include/unistd.h @@ -48,6 +48,15 @@ int open(const char *path, int flags); /* + * Close a file using its file descriptor + * + * @fd: File descriptor to close + * + * Returns zero on success + */ +int close(int fd); + +/* * POSIX write system call * * @fd: File descriptor to write at @@ -56,4 +65,13 @@ int open(const char *path, int flags); */ ssize_t write(int fd, const void *buf, size_t count); +/* + * POSIX read system call + * + * @fd: File descriptor to read + * @buf: Buffer to read into + * @count: Number of bytes to read + */ +ssize_t read(int fd, void *buf, size_t count); + #endif /* _UNISTD_H */ |