Improve syscall definitions

- Allow constant id specification
- Define function signature in SYSCALL macro
- Move implementation into src/kernel/syscalls/*.cpp
This commit is contained in:
Justin C. Miller
2019-04-02 23:14:52 -07:00
parent 11a53e792f
commit 8375870af6
13 changed files with 173 additions and 97 deletions

View File

@@ -1,12 +1,12 @@
SYSCALL(noop, 0)
SYSCALL(exit, 1)
SYSCALL(getpid, 0)
SYSCALL(fork, 0)
SYSCALL(0x00, noop, void)
SYSCALL(0x01, exit, void, int64_t)
SYSCALL(0x02, getpid, pid_t)
SYSCALL(0x03, fork, pid_t)
SYSCALL(message, 1)
SYSCALL(0x10, message, void, const char *)
SYSCALL(pause, 0)
SYSCALL(sleep, 1)
SYSCALL(0x20, pause, void)
SYSCALL(0x21, sleep, void, uint64_t)
SYSCALL(send, 2)
SYSCALL(receive, 2)
SYSCALL(0x30, send, void)
SYSCALL(0x31, receive, void)