Add sys_exit() and fix problem with %rax getting clobbered
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
#include "sys/thread.h"
|
||||
|
||||
void sched_add(struct thread *t);
|
||||
void sched_init(void);
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "sys/fs/vfs.h"
|
||||
|
||||
#define THREAD_KERNEL (1 << 31)
|
||||
#define THREAD_STOPPED (1 << 2)
|
||||
|
||||
#if defined(ARCH_AMD64)
|
||||
typedef uint64_t *mm_space_t;
|
||||
@@ -22,6 +23,8 @@ struct thread {
|
||||
mm_space_t space;
|
||||
|
||||
// TODO: maybe __sched_thread
|
||||
int cpu;
|
||||
struct thread *prev;
|
||||
struct thread *next;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user