libc: Move pthread_create to user space

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: I5c447d94077debc79158686935f288e4c8e51e01
This commit is contained in:
Gregory Nutt
2020-06-29 08:26:29 -06:00
committed by patacongo
parent a876f0253a
commit bb9b58bdde
50 changed files with 239 additions and 269 deletions
+4 -2
View File
@@ -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();
}