MOS Source Code
Loading...
Searching...
No Matches
context.cpp File Reference
+ Include dependency graph for context.cpp:

Go to the source code of this file.

Typedefs

typedef void(* switch_func_t) ()
 

Functions

void x86_normal_switch_impl ()
 
void x86_context_switch_impl (ptr_t *old_stack, ptr_t new_kstack, switch_func_t switcher, bool *lock)
 
static void x86_start_kernel_thread ()
 
static void x86_start_user_thread ()
 
static platform_regs_tx86_setup_thread_common (Thread *thread)
 
void platform_context_setup_main_thread (Thread *thread, ptr_t entry, ptr_t sp, int argc, ptr_t argv, ptr_t envp)
 
void platform_context_cleanup (Thread *thread)
 
void platform_context_setup_child_thread (Thread *thread, thread_entry_t entry, void *arg)
 
void platform_context_clone (Thread *from, Thread *to)
 
void platform_switch_to_thread (Thread *current, Thread *new_thread, switch_flags_t switch_flags)
 
void x86_set_fsbase (Thread *thread)
 

Variables

mos::Slab< u8xsave_area_slab ("x86.xsave", 0)
 

Typedef Documentation

◆ switch_func_t

typedef void(* switch_func_t) ()

Definition at line 24 of file context.cpp.

Function Documentation

◆ x86_normal_switch_impl()

void x86_normal_switch_impl ( )

◆ x86_context_switch_impl()

void x86_context_switch_impl ( ptr_t * old_stack,
ptr_t new_kstack,
switch_func_t switcher,
bool * lock )

◆ x86_start_kernel_thread()

static void x86_start_kernel_thread ( )
static

Definition at line 30 of file context.cpp.

Referenced by platform_switch_to_thread().

+ Here is the call graph for this function:

◆ x86_start_user_thread()

static void x86_start_user_thread ( )
static

Definition at line 39 of file context.cpp.

Referenced by platform_switch_to_thread().

+ Here is the call graph for this function:

◆ x86_setup_thread_common()

static platform_regs_t * x86_setup_thread_common ( Thread * thread)
static

Definition at line 46 of file context.cpp.

Referenced by platform_context_setup_child_thread(), and platform_context_setup_main_thread().

+ Here is the call graph for this function:

◆ platform_context_setup_main_thread()

void platform_context_setup_main_thread ( Thread * thread,
ptr_t entry,
ptr_t sp,
int argc,
ptr_t argv,
ptr_t envp )

Definition at line 68 of file context.cpp.

+ Here is the call graph for this function:

◆ platform_context_cleanup()

void platform_context_cleanup ( Thread * thread)

Definition at line 78 of file context.cpp.

◆ platform_context_setup_child_thread()

void platform_context_setup_child_thread ( Thread * thread,
thread_entry_t entry,
void * arg )

Definition at line 85 of file context.cpp.

+ Here is the call graph for this function:

◆ platform_context_clone()

void platform_context_clone ( Thread * from,
Thread * to )

Definition at line 101 of file context.cpp.

+ Here is the call graph for this function:

◆ platform_switch_to_thread()

void platform_switch_to_thread ( Thread * current,
Thread * new_thread,
switch_flags_t switch_flags )

Definition at line 120 of file context.cpp.

+ Here is the call graph for this function:

◆ x86_set_fsbase()

void x86_set_fsbase ( Thread * thread)

Definition at line 149 of file context.cpp.

Referenced by platform_arch_syscall(), and platform_switch_to_thread().

Variable Documentation

◆ xsave_area_slab

mos::Slab< u8 > xsave_area_slab("x86.xsave", 0) ( "x86.xsave" ,
0  )