fix: simple multitasking work !!!!
add a stack at every task, and execute task while multitasking switching
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "list.h"
|
||||
#include "memory.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@ -9,6 +10,8 @@ extern struct task *current_task;
|
||||
enum status { ZOMBIE, THREAD, RUN };
|
||||
enum owner { OWNER_KERNEL, OWNER_USER };
|
||||
|
||||
#define STACK_SIZE PAGE_SIZE * 4
|
||||
|
||||
struct task {
|
||||
uint32_t *esp;
|
||||
uint32_t *esp0;
|
||||
|
Reference in New Issue
Block a user