feature: fork added and exit_task is almost working

This commit is contained in:
2025-01-28 13:38:39 +01:00
parent d7626df19c
commit dbdf851dd2
9 changed files with 80 additions and 19 deletions

View File

@ -8,7 +8,7 @@
extern struct task *current_task;
enum status { ZOMBIE, THREAD, RUN };
enum status { ZOMBIE, THREAD, RUN, WAIT, SLEEP, STOPPED };
enum owner { OWNER_KERNEL, OWNER_USER };
#define STACK_SIZE PAGE_SIZE * 4
@ -32,4 +32,8 @@ struct task {
void scheduler(void);
void switch_to_task(struct task *next_task);
void exec_fn(void (*fn)(void));
struct task *create_task(u8 uid);
i8 create_kernel_task(void);
void remove_task(struct task *task);
u16 fork(void);
u16 wait(void);