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
|
@ -90,8 +90,8 @@ pub fn sys_waitpid(pid: isize, exit_code: *mut i32) -> isize {
|
|||
syscall(SYSCALL_WAITPID, [pid as usize, exit_code as usize, 0])
|
||||
}
|
||||
|
||||
pub fn sys_thread_create(entry: usize) -> isize {
|
||||
syscall(SYSCALL_THREAD_CREATE, [entry, 0, 0])
|
||||
pub fn sys_thread_create(entry: usize, arg: usize) -> isize {
|
||||
syscall(SYSCALL_THREAD_CREATE, [entry, arg, 0])
|
||||
}
|
||||
|
||||
pub fn sys_gettid() -> isize {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue