This website requires JavaScript.
Explore
Help
Register
Sign In
apio
/
Luna
Watch
1
Star
1
Fork
0
You've already forked Luna
Code
Issues
Pull Requests
Actions
Projects
Releases
8
Wiki
Activity
f83a6ace51
Luna
/
kernel
/
include
/
errno.h
6 lines
83 B
C
Raw
Normal View
History
Unescape
Escape
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 10:06:09 +00:00
#
pragma once
#
define EPERM 1
#
define ENOMEM 12
Kernel, libc: Add ENOSYS This error is returned by the kernel/C Library when an attempt is made to use a system call that doesn't exist.
2022-10-08 12:18:25 +00:00
#
define EINVAL 22
#
define ENOSYS 38
Reference in New Issue
Copy Permalink