We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7e5d2f commit 0aa47a7Copy full SHA for 0aa47a7
lib/cmsis_rtos_v1/cmsis_mutex.c
@@ -84,8 +84,8 @@ osStatus osMutexRelease(osMutexId mutex_id)
84
return osErrorISR;
85
}
86
87
- /* The mutex was not obtained before */
88
- if (mutex->lock_count == 0) {
+ /* Mutex was not obtained before or was not owned by current thread */
+ if ((mutex->lock_count == 0) || (mutex->owner != _current)) {
89
return osErrorResource;
90
91
0 commit comments