diff options
Diffstat (limited to 'kernel/task.c')
| -rw-r--r-- | kernel/task.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/kernel/task.c b/kernel/task.c index 5373133..be9ddd9 100644 --- a/kernel/task.c +++ b/kernel/task.c @@ -1,6 +1,8 @@ // http://hosted.cjmovie.net/TutMultitask.htm // // +#define FOOLOS_MODULE_NAME "task" + #include "kernel.h" #include "lib/logger/log.h" // logger facilities #include "mem.h" @@ -11,8 +13,6 @@ #include "syscalls.h" #include "fs/fs.h" #include "fs/ext2.h" -#define FOOLOS_MODULE_NAME "task" - #define MAX_TASKS 10 @@ -92,7 +92,6 @@ volatile uint32_t task_switch_next(uint32_t oldesp) } - //TODO: free vmem too! //TODO: notify waiting parent when child finished; volatile uint32_t task_exit(uint32_t oldesp) @@ -145,7 +144,6 @@ volatile uint32_t task_fork(uint32_t oldesp) return pid; } - // init task (root of all other tasks / processes) // volatile void task_init(pdirectory *dir) { @@ -161,7 +159,6 @@ volatile void task_init(pdirectory *dir) switch_to_user_mode(); } - volatile int task_get_current_pid() { return current_task; @@ -171,9 +168,8 @@ volatile uint32_t task_get_brk() { return task_list[current_task].brk; } + volatile void task_set_brk(uint32_t brk) { task_list[current_task].brk=brk; } - - |
