feature: fork added and exit_task is almost working
This commit is contained in:
@ -25,7 +25,8 @@ static inline void cli(void)
|
||||
__asm__ volatile("cli");
|
||||
}
|
||||
|
||||
static inline void sti(void)
|
||||
// aka sti
|
||||
static inline void toris(void)
|
||||
{
|
||||
__asm__ volatile("sti");
|
||||
}
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user