Adding a scheduler function and cleanup

This commit is contained in:
thomas committed 2018-03-29 19:36:32 +02:00
1 parent b5f5a40fbc
commit a39fdcf3ce
3 files changed
+38 -40

No files matched your search

+4 -2
View File
@@ -5,15 +5,17 @@
struct thread
{
uintptr_t stack_ptr;
uint64_t tid;
void *stack_ptr;
uint64_t state;
QUEUE_SPOT(runQ);
uint8_t stack[];
};
struct thread *thread();
struct thread *new_thread(void (*function)(void));
void yield();
struct thread *current_thread();
void start_scheduler();
void switch_stack(void *old_ptr, void *new_ptr);