6#include <sys/kconfig.h>
7#include <sys/kassert.h>
10#include <sys/thread.h>
11#include <machine/amd64.h>
12#include <machine/amd64op.h>
13#include <machine/trap.h>
14#include <machine/pmap.h>
34 tf = (
TrapFrame *)(stacktop -
sizeof(*tf));
38 memset(tf, 0,
sizeof(*tf));
39 memset(sf, 0,
sizeof(*sf));
62 memset(&tf, 0,
sizeof(tf));
void switchstack(uint64_t *oldrsp, uint64_t rsp)
void Thread_SetupUThread(Thread *thr, uintptr_t rip, uintptr_t arg)
void Thread_SetupKThread(Thread *thr, void(*f)(), uintptr_t arg1, uintptr_t arg2, uintptr_t arg3)
void Thread_SwitchArch(Thread *oldthr, Thread *newthr)
TaskStateSegment64 TSS[MAX_CPUS]
static void ThreadEnterUserLevelCB(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3)
void ThreadKThreadEntry(TrapFrame *tf)
void Thread_InitArch(Thread *thr)
static INLINE void fxrstor(struct XSAVEArea *xsa)
static INLINE void clts()
static INLINE void fxsave(struct XSAVEArea *xsa)
#define MEM_USERSPACE_STKLEN
void * memset(void *dst, int c, size_t len)
void Trap_Pop(TrapFrame *tf)