mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
when pthread exits or is cancelled, mutexes held by thread are marked inconsistent and the highest priority thread waiting for the mutex is awakened.
This commit is contained in:
@@ -123,6 +123,10 @@ void pthread_exit(FAR void *exit_value)
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Recover any mutexes still held by the canceled thread */
|
||||
|
||||
pthread_mutex_inconsistent(tcb);
|
||||
|
||||
/* Perform common task termination logic. This will get called again later
|
||||
* through logic kicked off by _exit(). However, we need to call it before
|
||||
* calling _exit() in order certain operations if this is the last thread
|
||||
|
||||
Reference in New Issue
Block a user