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 0aa47a7 commit 1b03916Copy full SHA for 1b03916
tests/cmsis_rtos_v1/src/mutex.c
@@ -101,6 +101,12 @@ void tThread_entry_lock_timeout(void const *arg)
101
status = osMutexWait((osMutexId)arg, TIMEOUT - 100);
102
zassert_true(status == osErrorTimeoutResource, NULL);
103
104
+ /* At this point, mutex is held by the other thread.
105
+ * Trying to release it here should fail.
106
+ */
107
+ status = osMutexRelease((osMutexId)arg);
108
+ zassert_true(status == osErrorResource, "Mutex unexpectedly released");
109
+
110
/* This delay ensures that the mutex gets released by the other
111
* thread in the meantime
112
*/
0 commit comments