wip: scheduler needs to change eip or smth in order to call the fn
This commit is contained in:
@ -4,20 +4,27 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern struct task *current_task;
|
||||
|
||||
enum status { ZOMBIE, THREAD, RUN };
|
||||
enum owner { OWNER_KERNEL, OWNER_USER };
|
||||
|
||||
struct task {
|
||||
uint32_t *esp;
|
||||
uint32_t *esp0;
|
||||
uint32_t *cr3;
|
||||
uint32_t *cr3; // physical
|
||||
uint32_t *heap; // virtual
|
||||
uint32_t *eip;
|
||||
uint16_t pid;
|
||||
uint8_t status;
|
||||
uint8_t owner_id;
|
||||
struct task *daddy;
|
||||
struct task *child;
|
||||
struct list **signals;
|
||||
uint8_t owner_id;
|
||||
struct task *next;
|
||||
struct task *prev;
|
||||
};
|
||||
|
||||
void scheduler(void);
|
||||
void switch_to_task(struct task *next_task);
|
||||
void exec_fn(void (*fn)(void));
|
||||
|
||||
Reference in New Issue
Block a user