From 0985c6237b8592652d57efee2a964c4bc91ee455 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 8 Mar 2015 14:48:55 +0100 Subject: Implement missing syscalls. --- src/lib/include/syscall.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/lib/include/syscall.h') diff --git a/src/lib/include/syscall.h b/src/lib/include/syscall.h index b94c7fd..7579be3 100644 --- a/src/lib/include/syscall.h +++ b/src/lib/include/syscall.h @@ -9,14 +9,16 @@ #include #include +#include -typedef int fd_t; -typedef int pid_t; +typedef void (*entry_t)(void*); void dbg_print(const char* str); void yield(); void exit(int code); void usleep(int usecs); +bool new_thread(entry_t entry, void* data); +void exit_thread(); bool mmap(void* addr, size_t size, int mode); bool mmap_file(fd_t file, size_t offset, void* addr, size_t size, int mode); @@ -37,6 +39,10 @@ bool stat_open(fd_t file, stat_t *s); int ioctl(fd_t file, int command, void* data); int get_mode(fd_t file); +fd_pair_t make_channel(bool blocking); +bool gen_token(fd_t file, token_t *tok); +fd_t use_token(token_t *tok); + bool make_fs(const char* name, const char* driver, fd_t source, const char* options); bool fs_add_source(const char* fs, fd_t source, const char* options); bool fs_subfs(const char* name, const char* orig_fs, const char* root, int ok_modes); -- cgit v1.2.3