mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
libc: Move pthread_create to user space
Signed-off-by: Huang Qi <huangqi3@xiaomi.com> Change-Id: I5c447d94077debc79158686935f288e4c8e51e01
This commit is contained in:
@@ -47,9 +47,10 @@
|
||||
* pthread.
|
||||
*
|
||||
* Normally the a user-mode start-up stub will also execute before the
|
||||
* pthread actually starts. See libc/pthread/pthread_startup.c
|
||||
* pthread actually starts. See libc/pthread/pthread_create.c
|
||||
*
|
||||
* Input Parameters:
|
||||
* startup - The user-space pthread startup function
|
||||
* entrypt - The user-space address of the pthread entry point
|
||||
* arg - Standard argument for the pthread entry point
|
||||
*
|
||||
@@ -66,7 +67,8 @@ void up_pthread_start(pthread_startroutine_t entrypt, pthread_addr_t arg)
|
||||
|
||||
sinfo("entry %p arg %p\n", entrypt, arg);
|
||||
|
||||
sys_call2(SYS_pthread_start, (uintptr_t)entrypt, (uintptr_t)arg);
|
||||
sys_call3(SYS_pthread_start, (uintptr_t)startup, (uintptr_t)entrypt,
|
||||
(uintptr_t)arg);
|
||||
|
||||
PANIC();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user