diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-19 23:03:26 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-19 23:03:26 -0400 |
commit | 60e89b6b9cf2af1ebd7e71c8624282b9ecd79a09 (patch) | |
tree | dc61fa44be993af0e5cd82f08e0d258182d148b2 /sys/include | |
parent | 4d4d412ca48802200933eb0e2b0b007855d4aa7d (diff) |
kernel: syscall: Add sys_write()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/sys/filedesc.h | 3 | ||||
-rw-r--r-- | sys/include/sys/syscall.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/include/sys/filedesc.h b/sys/include/sys/filedesc.h index ef74fb1..df30c69 100644 --- a/sys/include/sys/filedesc.h +++ b/sys/include/sys/filedesc.h @@ -32,6 +32,7 @@ #include <sys/vnode.h> #include <sys/spinlock.h> +#include <sys/syscall.h> #include <sys/types.h> struct proc; @@ -48,6 +49,8 @@ struct filedesc { struct filedesc *fd_alloc(struct proc *td); struct filedesc *fd_from_fdnum(const struct proc *td, int fdno); void fd_close_fdnum(struct proc *td, int fdno); +ssize_t write(int fd, const void *buf, size_t count); +uint64_t sys_write(struct syscall_args *args); #endif #endif diff --git a/sys/include/sys/syscall.h b/sys/include/sys/syscall.h index b78e2ad..e75b193 100644 --- a/sys/include/sys/syscall.h +++ b/sys/include/sys/syscall.h @@ -38,6 +38,7 @@ /* Do not reorder */ enum { SYS_exit = 1, + SYS_write, __MAX_SYSCALLS }; |