summaryrefslogtreecommitdiff
path: root/src/shared/syscalls.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/syscalls.h')
-rw-r--r--src/shared/syscalls.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/shared/syscalls.h b/src/shared/syscalls.h
index 9eb3fa5..d0c6640 100644
--- a/src/shared/syscalls.h
+++ b/src/shared/syscalls.h
@@ -1,3 +1,5 @@
+// requires the user_ptr type from kernel/types.h or init/types.h
+
#pragma once
#include <stddef.h>
@@ -21,12 +23,12 @@ enum {
/** Kills the current process.
* TODO: what happens to the children?
*/
-_Noreturn void _syscall_exit(const char *msg, size_t len);
+_Noreturn void _syscall_exit(const user_ptr msg, size_t len);
/** Waits for a child to exit, putting its exit message into *buf.
* @return the length of the message
*/
-int _syscall_await(char *buf, int len);
+int _syscall_await(user_ptr buf, int len);
/** Creates a copy of the current process, and executes it.
* All user memory pages get copied too.
@@ -34,9 +36,9 @@ int _syscall_await(char *buf, int len);
*/
int _syscall_fork(void);
-fd_t _syscall_fs_open(const char *path, int len);
-int _syscall_mount(const char *path, int len, fd_t fd);
+fd_t _syscall_fs_open(const user_ptr path, int len);
+int _syscall_mount(const user_ptr 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_read(fd_t fd, user_ptr buf, int len);
+int _syscall_fd_write(fd_t fd, user_ptr buf, int len);
int _syscall_fd_close(fd_t fd);