11#include <sys/syscall.h>
13#include <sys/kassert.h>
14#include <sys/kconfig.h>
15#include <sys/kdebug.h>
19#include <sys/spinlock.h>
20#include <sys/thread.h>
22#include <machine/trap.h>
23#include <machine/pmap.h>
void Thread_SwitchArch(Thread *oldthr, Thread *newthr)
uint32_t Critical_Level()
#define SCHED_STATE_RUNNING
#define PROC_STATE_ZOMBIE
#define SCHED_STATE_WAITING
#define SCHED_STATE_RUNNABLE
#define SCHED_STATE_ZOMBIE
void Thread_Retain(Thread *thr)
UnixEpochNS KTime_GetEpochNS()
void PMap_LoadAS(AS *space)
#define TAILQ_INSERT_TAIL(head, elm, field)
#define TAILQ_FIRST(head)
#define TAILQ_REMOVE(head, elm, field)
void Sched_SetWaiting(Thread *thr)
ThreadQueue runnableQueue
Thread * curProc[MAX_CPUS]
void Sched_SetZombie(Thread *thr)
void Sched_SetRunnable(Thread *thr)
static void Sched_Switch(Thread *oldthr, Thread *newthr)
void Spinlock_Unlock(Spinlock *lock) __UNLOCK_EX(*lock)
void Spinlock_Lock(Spinlock *lock) __LOCK_EX(*lock)
ProcessQueue childrenList
void Mutex_Unlock(Mutex *mtx)
void Mutex_Lock(Mutex *mtx)