Create threads with a argument. See bin/threads_arg.rs

This commit is contained in:
Yifan Wu 2021-10-08 13:50:36 -07:00
parent c951c1781e
commit 5b56961b8c
11 changed files with 59 additions and 19 deletions

View file

@ -104,7 +104,7 @@ pub fn sleep(sleep_ms: usize) {
sys_sleep(sleep_ms);
}
pub fn thread_create(entry: usize) -> isize { sys_thread_create(entry) }
pub fn thread_create(entry: usize, arg: usize) -> isize { sys_thread_create(entry, arg) }
pub fn gettid() -> isize { sys_gettid() }
pub fn waittid(tid: usize) -> isize {
loop {