From caad8d9443d1e751ba743de660cc1d592faae5d9 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 9 Sep 2024 14:12:10 -0400 Subject: kernel: vfs: Refactor fd related code Signed-off-by: Ian Moffett --- sys/include/sys/filedesc.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys/include') diff --git a/sys/include/sys/filedesc.h b/sys/include/sys/filedesc.h index dbac349..f5f24db 100644 --- a/sys/include/sys/filedesc.h +++ b/sys/include/sys/filedesc.h @@ -43,4 +43,11 @@ struct filedesc { struct spinlock lock; }; +int fd_close(unsigned int fd); +int fd_read(unsigned int fd, void *buf, size_t count); + +int fd_alloc(struct filedesc **fd_out); +int fd_open(const char *pathname, int flags); +struct filedesc *fd_get(unsigned int fdno); + #endif /* !_SYS_FILEDESC_H_ */ -- cgit v1.2.3