diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-03-08 14:48:55 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-03-08 14:48:55 +0100 |
commit | 0985c6237b8592652d57efee2a964c4bc91ee455 (patch) | |
tree | 1ac06e7c924f9d34d738e23694d4efbbe9725123 /src/common | |
parent | ad63830f0d841c41291fc01aed6e54726bd0b93f (diff) | |
download | kogata-0985c6237b8592652d57efee2a964c4bc91ee455.tar.gz kogata-0985c6237b8592652d57efee2a964c4bc91ee455.zip |
Implement missing syscalls.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/include/syscallproto.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/common/include/syscallproto.h b/src/common/include/syscallproto.h index 9673cde..bbb49b3 100644 --- a/src/common/include/syscallproto.h +++ b/src/common/include/syscallproto.h @@ -2,12 +2,18 @@ #include <proc.h> +typedef int fd_t; +typedef int pid_t; +typedef struct { fd_t a, b; } fd_pair_t; + #define SC_MAX 128 // maximum number of syscalls #define SC_DBG_PRINT 0 // args: msg, msg_strlen #define SC_EXIT 1 // args: code #define SC_YIELD 2 // args: () #define SC_USLEEP 3 // args: usecs +#define SC_NEW_THREAD 4 // args: eip, esp +#define SC_EXIT_THREAD 5 // args: () #define SC_MMAP 10 // args: addr, size, mode #define SC_MMAP_FILE 11 // args: handle, offset, addr, size, mode @@ -57,12 +63,12 @@ typedef struct { const char* fs_name; size_t fs_name_strlen; - int source_fd; + fd_t source_fd; const char* opts; size_t opts_strlen; - int bind_to_pid; // zero = bind to current proc + pid_t bind_to_pid; // zero = bind to current proc } sc_make_fs_args_t; typedef struct { @@ -77,7 +83,7 @@ typedef struct { int ok_modes; - int bind_to_pid; // 0 = bind to current proc + pid_t bind_to_pid; // 0 = bind to current proc } sc_subfs_args_t; /* vim: set ts=4 sw=4 tw=0 noet :*/ |