diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-19 11:45:49 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-19 11:45:49 +0200 |
commit | 499ca6c243b05da176a2d4bd9a2317f0b28afc7f (patch) | |
tree | f55ff788632b017ab8de83b71ad02b0998e1dda5 /src/kernel/task | |
parent | 7b466345af0d3a7dc5622617ce443a90c64e34a4 (diff) | |
download | TCE-499ca6c243b05da176a2d4bd9a2317f0b28afc7f.tar.gz TCE-499ca6c243b05da176a2d4bd9a2317f0b28afc7f.zip |
Introducing FWIK, the userland C++ framework. Far from complete.
Diffstat (limited to 'src/kernel/task')
-rw-r--r-- | src/kernel/task/task.cpp | 4 | ||||
-rw-r--r-- | src/kernel/task/task.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel/task/task.cpp b/src/kernel/task/task.cpp index 7eb2b36..03425b5 100644 --- a/src/kernel/task/task.cpp +++ b/src/kernel/task/task.cpp @@ -349,7 +349,7 @@ static void process_finish(process *pr, int retval) { if (proc_count == 0) PANIC("No more processes are running! This is bad! Or is it?"); } -size_t process::sbrk(size_t size) { +size_t process::sbrk(ptrdiff_t size) { if (data == 0) return -1; ASSERT(data < K_HIGHHALF_ADDR); if (data + size >= K_HIGHHALF_ADDR) return -1; @@ -420,7 +420,7 @@ void* process::set_args(char** args) { // ===================== SYSTEM CALLS -size_t process_sbrk(size_t size) { +size_t process_sbrk(ptrdiff_t size) { return current_process->sbrk(size); } diff --git a/src/kernel/task/task.h b/src/kernel/task/task.h index 8a0e94a..e6e0c6e 100644 --- a/src/kernel/task/task.h +++ b/src/kernel/task/task.h @@ -44,7 +44,7 @@ class process { process(process *parent, uint32_t uid, uint32_t privilege); void* set_args(char** args); - size_t sbrk(size_t size); + size_t sbrk(ptrdiff_t size); }; class thread { @@ -81,7 +81,7 @@ int proc_priv(); //Returns current privilege level // syscalls void thread_exit(); void process_exit(size_t retval); -size_t process_sbrk(size_t size); +size_t process_sbrk(ptrdiff_t size); void process_brk(size_t ptr); int process_run(char* file, char** args, FILE zero_fd); int process_waitpid(int pid, int block); |