(ms: usize)
| 4 | use alloc::sync::Arc; |
| 5 | |
| 6 | pub fn sys_sleep(ms: usize) -> isize { |
| 7 | let expire_ms = get_time_ms() + ms; |
| 8 | let task = current_task().unwrap(); |
| 9 | add_timer(expire_ms, task); |
| 10 | block_current_and_run_next(); |
| 11 | 0 |
| 12 | } |
| 13 | |
| 14 | pub fn sys_mutex_create(blocking: bool) -> isize { |
| 15 | let process = current_process(); |
no test coverage detected