summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-07-31 06:16:22 -0400
committerIan Moffett <ian@osmora.org>2025-07-31 06:16:22 -0400
commit7e8ff80fadd2066f8fa9a058efe23aa301325433 (patch)
tree15ceceea43cf54092bf7e006d49bfe3514d1eeda /sys/include
parentcd929e7209f3fd67e1fab257ea76994bbb3fc64f (diff)
kernel: descrip: Add 'td' parameter to fd routines
Update the signature of 'fd_get()', 'fd_alloc()' and 'fd_dup()' to include a pointer to the process to target. This improves the flexibility of the file descriptor API. Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/filedesc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/include/sys/filedesc.h b/sys/include/sys/filedesc.h
index 4ce2db2..adbcfa8 100644
--- a/sys/include/sys/filedesc.h
+++ b/sys/include/sys/filedesc.h
@@ -55,12 +55,12 @@ int fd_close(unsigned int fd);
int fd_read(unsigned int fd, void *buf, size_t count);
int fd_write(unsigned int fd, void *buf, size_t count);
-int fd_alloc(struct filedesc **fd_out);
+int fd_alloc(struct proc *td, struct filedesc **fd_out);
int fd_open(const char *pathname, int flags);
off_t fd_seek(int fildes, off_t offset, int whence);
-int fd_dup(int fd);
-struct filedesc *fd_get(unsigned int fdno);
+int fd_dup(struct proc *td, int fd);
+struct filedesc *fd_get(struct proc *td, unsigned int fdno);
scret_t sys_lseek(struct syscall_args *scargs);