From 706c69d40fcc46e7d7f170dab932d3c7fcc7c34e Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 13 Feb 2015 22:44:10 +0100 Subject: Begin implementation of syscalls. --- src/kernel/include/process.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/kernel/include/process.h') diff --git a/src/kernel/include/process.h b/src/kernel/include/process.h index 661aaa6..82ba8dd 100644 --- a/src/kernel/include/process.h +++ b/src/kernel/include/process.h @@ -35,15 +35,22 @@ process_t *new_process(process_t *parent); // void delete_process(process_t *p); // TODO define semantics for freeing stuff pagedir_t *proc_pagedir(process_t *p); +int proc_pid(process_t *p); bool start_process(process_t *p, proc_entry_t entry); // maps a region for user stack 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); bool mmap(process_t *proc, void* addr, size_t size, int mode); // create empty zone bool mmap_file(process_t *proc, fs_handle_t *h, size_t offset, void* addr, size_t size, int mode); bool mchmap(process_t *proc, void* addr, int mode); bool munmap(process_t *proc, void* addr); +// for syscalls : check that process is authorized to do that +// (if not, process exits with a segfault) +void probe_for_read(const void* addr, size_t len); +void probe_for_write(const void* addr, size_t len); + /* vim: set ts=4 sw=4 tw=0 noet :*/ -- cgit v1.2.3