MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / set_current_thread

Function set_current_thread

kernel/src/process.rs:336–342  ·  view source on GitHub ↗

Makes the given thread the current thread If another thread was running schedule it

(thread: Box<Thread>)

Source from the content-addressed store, hash-verified

334/// Makes the given thread the current thread
335/// If another thread was running schedule it
336pub fn set_current_thread(thread: Box<Thread>) {
337 // Replace the current thread
338 let old_current = CURRENT_THREAD.write().replace(thread);
339 if let Some(t) = old_current {
340 schedule_thread(t);
341 }
342}
343
344/// Start a new kernel thread by adding it to the process table.
345/// This won't run immediately, but will run when the scheduler

Callers 8

sys_receiveFunction · 0.85
sys_sendFunction · 0.85
sys_copy_rendezvousFunction · 0.85
sys_execFunction · 0.85
sys_mountFunction · 0.85
sys_listmountsFunction · 0.85
sys_umountFunction · 0.85
sys_closeFunction · 0.85

Calls 2

schedule_threadFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected