mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
task/pthread_cancelpt: Move cancel point handling to libc, data to TLS
This moves task / thread cancel point logic from the NuttX kernel into libc, while the data needed by the cancel point logic is moved to TLS. The change is an enabler to move user-space APIs to libc as well, for a coherent user/kernel separation.
This commit is contained in:
@@ -430,17 +430,6 @@ void nxtask_exithook(FAR struct tcb_s *tcb, int status)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CANCELLATION_POINTS
|
||||
/* Mark the task as non-cancelable to avoid additional calls to exit()
|
||||
* due to any cancellation point logic that might get kicked off by
|
||||
* actions taken during exit processing.
|
||||
*/
|
||||
|
||||
tcb->flags |= TCB_FLAG_NONCANCELABLE;
|
||||
tcb->flags &= ~TCB_FLAG_CANCEL_PENDING;
|
||||
tcb->cpcount = 0;
|
||||
#endif
|
||||
|
||||
/* If the task was terminated by another task, it may be in an unknown
|
||||
* state. Make some feeble effort to recover the state.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user