Thread switching (one thread)

This commit is contained in:
2022-01-10 22:23:27 +01:00
parent 95070134fd
commit 9a68961a64
4 changed files with 118 additions and 0 deletions

16
src/kernel/include/proc.h Normal file
View File

@@ -0,0 +1,16 @@
#pragma once
#include <stdint.h>
struct thread
{
struct thread *q_next;
uint64_t tid;
void *stack;
uint64_t state;
};
// proc/swtch.S
void *switch_stack(void *out, void *in);
// proc/thread.c
void start_scheduler();