From 277b329c5609b8172ad0c142117edfa9a08279da Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 19 Feb 2015 18:25:29 +0100 Subject: Implement basic syscalls... --- src/kernel/include/process.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/kernel/include') diff --git a/src/kernel/include/process.h b/src/kernel/include/process.h index 5d9c3bf..07cc14e 100644 --- a/src/kernel/include/process.h +++ b/src/kernel/include/process.h @@ -18,7 +18,6 @@ #include - #define USERSTACK_ADDR 0xB8000000 #define USERSTACK_SIZE 0x00020000 // 32 KB @@ -29,6 +28,8 @@ typedef struct process { btree_t *regions_idx; hashtbl_t *filesystems; + hashtbl_t *files; + int next_fd; thread_t *thread; @@ -47,7 +48,10 @@ bool start_process(process_t *p, proc_entry_t entry); // maps a region for user bool proc_add_fs(process_t *p, fs_t *fs, const char* name); fs_t *proc_find_fs(process_t *p, const char* name); -bool proc_rm_fs(process_t *p, const char* name); +void proc_rm_fs(process_t *p, const char* name); +int proc_add_fd(process_t *p, fs_handle_t *f); // on error returns 0, nonzero other