Create threads with a argument. See bin/threads_arg.rs
This commit is contained in:
parent
c951c1781e
commit
5b56961b8c
11 changed files with 59 additions and 19 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue