summaryrefslogtreecommitdiff
path: root/src/kernel/syscalls.h
diff options
context:
space:
mode:
authordzwdz2021-08-24 16:25:50 +0200
committerdzwdz2021-08-24 16:25:50 +0200
commit83fa1f34ea744da7d26997179a0dd6af751dd8b0 (patch)
tree0794348a02acebf36ecab9ad665bc0f0f75fbfee /src/kernel/syscalls.h
parent2df1c7370bf596aebbe06f7333a65a6f4d6ec15a (diff)
add some scaffolding for file descriptors
Diffstat (limited to 'src/kernel/syscalls.h')
-rw-r--r--src/kernel/syscalls.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/kernel/syscalls.h b/src/kernel/syscalls.h
index f3e8dc0..d8ca5c3 100644
--- a/src/kernel/syscalls.h
+++ b/src/kernel/syscalls.h
@@ -14,6 +14,10 @@ enum {
_SYSCALL_FS_OPEN,
_SYSCALL_MOUNT,
+ _SYSCALL_FD_READ,
+ _SYSCALL_FD_WRITE,
+ _SYSCALL_FD_CLOSE,
+
_SYSCALL_DEBUGLOG
};
@@ -36,6 +40,10 @@ int _syscall_fork();
fd_t _syscall_fs_open(const char *path, int len);
int _syscall_mount(const char *path, int len, fd_t fd);
+int _syscall_fd_read(fd_t fd, char *buf, int len);
+int _syscall_fd_write(fd_t fd, char *buf, int len);
+int _syscall_fd_close(fd_t fd);
+
/** Prints a message to the debug console.
* @return the amount of bytes written (can be less than len)
*/