From fbfc078e9f44c1c1e95c9c484f1d5650bcf631b7 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sat, 27 Jul 2024 16:57:39 -0400 Subject: lots and lots of userspace stuff --- documentation/kernel-interfaces/syscalls.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'documentation/kernel-interfaces/syscalls.txt') diff --git a/documentation/kernel-interfaces/syscalls.txt b/documentation/kernel-interfaces/syscalls.txt index ca93b56..399eb19 100644 --- a/documentation/kernel-interfaces/syscalls.txt +++ b/documentation/kernel-interfaces/syscalls.txt @@ -20,6 +20,7 @@ stream result: 12 = other end closed 13 = already exists 14 = not sized + 15 = not readable encode color: rax in: 0 @@ -173,3 +174,27 @@ get other end process handle: rdi in: stream handle rax out: stream result rdi out: process handle (if rax = success) + +start thread: + rax in: 20 + rdi in: entry point + rsi in: argument + at entry, rsp is set to the top of a new stack, rdi is set + to the argument, and the other registers are undefined. + +clear socket read queue: + rax in: 21 + rdi in: stream handle + rax out: number of bytes cleared (0 on bad handle or not a socket) + +get environment variable length: + rax in: 22 + rdi in: pointer to variable name + rsi in: variable name length + rax out: variable value length, or -1 if unset + +get environment variable value: + rax in: 23 + rdi in: pointer to variable name + rsi in: variable name length + rdx in: pointer to buffer for variable value -- cgit v1.2.3