diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-26 18:26:16 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-26 18:26:16 -0400 |
commit | 54224fb3d937811de957d51596602c0f2afc5fbe (patch) | |
tree | f8f3b28a74dacd2bbbbc61f20afa52c455905b56 /sys/include | |
parent | 42ad59bdb6df99ccd146d6d67cb8c838be709ec5 (diff) |
kernel: Add initial read() implementation
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/sys/filedesc.h | 2 | ||||
-rw-r--r-- | sys/include/sys/syscall.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/include/sys/filedesc.h b/sys/include/sys/filedesc.h index e0835a5..70b297d 100644 --- a/sys/include/sys/filedesc.h +++ b/sys/include/sys/filedesc.h @@ -55,10 +55,12 @@ 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); int open(const char *pathname, int oflag); +int read(int fd, void *buf, size_t count); uint64_t sys_write(struct syscall_args *args); uint64_t sys_open(struct syscall_args *args); uint64_t sys_close(struct syscall_args *args); +uint64_t sys_read(struct syscall_args *args); #endif #endif diff --git a/sys/include/sys/syscall.h b/sys/include/sys/syscall.h index 5020d3a..ae2438f 100644 --- a/sys/include/sys/syscall.h +++ b/sys/include/sys/syscall.h @@ -41,6 +41,7 @@ enum { SYS_write, SYS_open, SYS_close, + SYS_read, __MAX_SYSCALLS }; |