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

@ -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 {