Luna/libs/libc/include
apio da2ede3450 Kernel, libc, userspace: Implement file descriptors
Kernel: Implement a descriptor struct which stores the opened node and read offset, and give each task 8 of those.
Implement three syscalls: sys_read, sys_open and sys_close (sys_write still writes to the console instead of using a fd, for now)
Implement three new errors: ENOENT, EBADF and EMFILE.

libc: Implement the new errors, and the new syscalls in syscall().
Also fix _RETURN_WITH_ERRNO() to set errno correctly, which was making strerror() return null, thus crashing perror().

userspace: make init demonstrate the new file API.
2022-10-10 20:21:39 +02:00
..
bits Kernel, libc, userspace: Implement file descriptors 2022-10-10 20:21:39 +02:00
luna Kernel, libc, userspace: Implement file descriptors 2022-10-10 20:21:39 +02:00
sys Define PAGE_SIZE as 4096 and use it everywhere instead of using 4096 as a magic number 2022-10-08 14:52:28 +02:00
errno.h Kernel, libc, userspace: Implement file descriptors 2022-10-10 20:21:39 +02:00
luna.h libc: Rename the _ folder to bits, as used internally by libraries 2022-10-04 19:11:54 +02:00
stdio.h Add a perror() function 2022-10-08 12:42:25 +02:00
stdlib.h libc: Rename the _ folder to bits, as used internally by libraries 2022-10-04 19:11:54 +02:00
string.h libc: Implement strerror() 2022-10-08 12:29:06 +02:00
time.h WIP: Add a C Library, let's try to compile a Hosted GCC cross-compiler using this! 2022-10-01 20:59:22 +02:00
unistd.h Make function stubs in libc loudly abort instead of silently failing 2022-10-02 18:10:53 +02:00