Scheduler and multiple threads
This commit is contained in:
@@ -5,12 +5,21 @@ struct thread
|
||||
{
|
||||
struct thread *q_next;
|
||||
uint64_t tid;
|
||||
void *stack;
|
||||
void *stack_ptr;
|
||||
uint64_t state;
|
||||
uint8_t stack[];
|
||||
};
|
||||
|
||||
// proc/thread.c
|
||||
extern struct thread *current_thread;
|
||||
|
||||
// proc/swtch.S
|
||||
void *switch_stack(void *out, void *in);
|
||||
|
||||
// proc/thread.c
|
||||
struct thread *new_thread(void (*function)(void));
|
||||
struct thread *thread();
|
||||
|
||||
// proc/scheduler.c
|
||||
void scheduler_insert(struct thread *new);
|
||||
void start_scheduler();
|
||||
Reference in New Issue
Block a user