mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 02:37:19 +02:00
Merge branch 'bugfix/backport_v4.1_fix_pthread_priority_inheritance' into 'release/v4.1'
pthread: fix the priority inheritance(backport v4.1) See merge request espressif/esp-idf!11259
This commit is contained in:
@ -593,6 +593,15 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex)
|
||||
return EBUSY;
|
||||
}
|
||||
|
||||
if (mux->type == PTHREAD_MUTEX_RECURSIVE) {
|
||||
res = xSemaphoreGiveRecursive(mux->sem);
|
||||
} else {
|
||||
res = xSemaphoreGive(mux->sem);
|
||||
}
|
||||
if (res != pdTRUE) {
|
||||
assert(false && "Failed to release mutex!");
|
||||
}
|
||||
|
||||
vSemaphoreDelete(mux->sem);
|
||||
free(mux);
|
||||
|
||||
|
Reference in New Issue
Block a user