From 143156f63e2448733f1a35a74e629fe0ae9bb567 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 13 Sep 2020 19:51:09 -0400 Subject: have command shell block while commands are running --- src/kernel/task.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/kernel/task.h') 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); -- cgit v1.2.3