mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
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:
@@ -87,5 +87,5 @@ int pthread_create(FAR pthread_t *thread, FAR const pthread_attr_t *attr,
|
||||
pthread_startroutine_t pthread_entry, pthread_addr_t arg)
|
||||
{
|
||||
return nx_pthread_create(pthread_startup, thread, attr, pthread_entry,
|
||||
arg);
|
||||
arg, pthread_exit);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
* Terminate execution of a thread started with pthread_create.
|
||||
*
|
||||
* Input Parameters:
|
||||
* exit_value
|
||||
* exit_value - The pointer of the pthread_exit parameter
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
|
||||
Reference in New Issue
Block a user