diff options
Diffstat (limited to 'src/kernel/task.h')
-rw-r--r-- | src/kernel/task.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/kernel/task.h b/src/kernel/task.h index 0fa9688..50be93a 100644 --- a/src/kernel/task.h +++ b/src/kernel/task.h @@ -6,6 +6,11 @@ #define TASK_NAME_LEN 15 +enum wait_mode { + NONE, + PROCESS_END, +}; + struct task_state { uint32_t ret_addr; void *page_directory; @@ -18,6 +23,9 @@ struct task_state { uint32_t ebp; uint32_t esp; + enum wait_mode wait_mode; + uint32_t wait_arg; + char name[TASK_NAME_LEN + 1]; } __attribute__ ((packed)); @@ -25,7 +33,7 @@ extern struct task_state *active_task; void init_tasks(); -void new_task(struct task_state state); +uint32_t new_task(struct task_state state); void advance_active_task(); void delete_task(struct task_state *state); |