[−][src]Function sunrise_libuser::threads::init_main_thread
#[no_mangle]pub extern "C" fn init_main_thread(handle: u32)
Initialisation of the main thread's thread local structures:
When a main thread starts, the kernel puts the handle of its own thread in one of its registers. The main thread should perform relocations, and then call this function, which will:
- put the main thread's handle in MAIN_THREAD_CONTEXT.
- save a pointer to it in its TLS.
- perform copy of
.tdata
and.tbss
for the main thread.