Luna/apps/src
apio 71e15e94af Kernel, libc and userspace: Add basic errno support.
Kernel: Add an errno.h header with definitions for each header,
and return those, negated, from syscalls when there is an error.
mmap() returns an invalid address with errno encoded, instead of
returning a negated errno; this address is encoded as ffffffffffffffEE
where EE is errno in hex.

libc: make syscall() return -1 and set errno on error, instead of
returning the raw return value of the system call. Also, add mmap()
and munmap() wrappers in sys/mman.h :).

userspace: make the memeater program show the value of errno
when allocating memory fails.

Things to improve: add perror() and strerror() to make the errno
experience even better! >.<
2022-10-08 12:06:09 +02:00
..
art.c Add a few example apps/demos in C, and make the kernel choose a random one to demonstrate every boot 2022-10-03 21:24:38 +02:00
fib.c Add a few example apps/demos in C, and make the kernel choose a random one to demonstrate every boot 2022-10-03 21:24:38 +02:00
init.c Add printf() and puts(), quite primitive, looks like hex printing isn't there yet... 2022-10-03 19:00:10 +02:00
leap.c Add a few example apps/demos in C, and make the kernel choose a random one to demonstrate every boot 2022-10-03 21:24:38 +02:00
memeater.c Kernel, libc and userspace: Add basic errno support. 2022-10-08 12:06:09 +02:00