libc: Call pthread_exit in user-space by up_pthread_exit

Drop to user-space in kernel/protected build with up_pthread_exit,
now all pthread_cleanup functions executed in user mode.

* A new syscall SYS_pthread_exit added
* A new tcb flag TCB_FLAG_CANCEL_DOING added
* up_pthread_exit implemented for riscv/arm arch

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi
2021-05-08 18:20:02 +08:00
committed by patacongo
parent 81a01d089b
commit f4a0b7aedd
90 changed files with 533 additions and 118 deletions
+1 -1
View File
@@ -63,7 +63,7 @@
void up_pthread_start(pthread_startroutine_t entrypt, pthread_addr_t arg)
{
/* Let sys_call2() do all of the work */
/* Let sys_call3() do all of the work */
sinfo("entry %p arg %p\n", entrypt, arg);