From 5a064ce758921ff6e0451506085399c8a82f6f6c Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 20 Sep 2025 21:33:49 -0400 Subject: 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 --- src/sys/include/compat/unix/syscall.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/sys/include/compat/unix') 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 @@ -34,15 +34,28 @@ #include #include +/* + * 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 */ -- cgit v1.2.3