diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-20 21:33:49 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-20 21:33:49 -0400 |
commit | 5a064ce758921ff6e0451506085399c8a82f6f6c (patch) | |
tree | 858e47bf1826c4119b1f6707b981b0f54f8a1aae /src/sys/include/compat | |
parent | ebc26c8259160193dde5b0baecf7230c8388fd29 (diff) |
kern: syscall: Add initial write(2) stub
Here we add a write(2) stub and add it to the UNIX syscall interface. We
also move the UNIX syscall numbers into compat/unix/syscall.h
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include/compat')
-rw-r--r-- | src/sys/include/compat/unix/syscall.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/sys/include/compat/unix/syscall.h b/src/sys/include/compat/unix/syscall.h index 2bb699a..daca2dc 100644 --- a/src/sys/include/compat/unix/syscall.h +++ b/src/sys/include/compat/unix/syscall.h @@ -35,14 +35,27 @@ #include <sys/syscall.h> /* + * Syscall numbers + */ +#define SYS_none 0x00 +#define SYS_exit 0x01 +#define SYS_write 0x02 + +/* * Exit the current process - exit(2) syscall */ scret_t sys_exit(struct syscall_args *scargs); +/* + * Write to a file descriptor - write(2) syscall + */ +scret_t sys_write(struct syscall_args *scargs); + #ifdef _NEED_UNIX_SCTAB scret_t(*g_unix_sctab[])(struct syscall_args *) = { [SYS_none] = NULL, - [SYS_exit] = sys_exit + [SYS_exit] = sys_exit, + [SYS_write] = sys_write }; #endif /* !_NEED_UNIX_SCTAB */ |