MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / add_timer

Function add_timer

os/src/timer.rs:57–60  ·  view source on GitHub ↗
(expire_ms: usize, task: Arc<TaskControlBlock>)

Source from the content-addressed store, hash-verified

55}
56
57pub fn add_timer(expire_ms: usize, task: Arc<TaskControlBlock>) {
58 let mut timers = TIMERS.exclusive_access();
59 timers.push(TimerCondVar { expire_ms, task });
60}
61
62pub fn check_timer() {
63 let current_ms = get_time_ms();

Callers 1

sys_sleepFunction · 0.85

Calls 2

exclusive_accessMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected