File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -108,10 +108,13 @@ bool Mutex::trylock_until(uint64_t millisec)
108
108
}
109
109
}
110
110
111
- osStatus Mutex::unlock ()
111
+ void Mutex::unlock ()
112
112
{
113
113
_count--;
114
- return osMutexRelease (_id);
114
+
115
+ osStatus status = osMutexRelease (_id);
116
+
117
+ MBED_ASSERT (status == osOK);
115
118
}
116
119
117
120
osThreadId Mutex::get_owner ()
Original file line number Diff line number Diff line change @@ -135,16 +135,12 @@ class Mutex : private mbed::NonCopyable<Mutex> {
135
135
*/
136
136
bool trylock_until (uint64_t millisec);
137
137
138
- /* * Unlock the mutex that has previously been locked by the same thread
139
- @return status code that indicates the execution status of the function:
140
- @a osOK the mutex has been released.
141
- @a osErrorParameter internal error.
142
- @a osErrorResource the mutex was not locked or the current thread wasn't the owner.
143
- @a osErrorISR this function cannot be called from the interrupt service routine.
138
+ /* *
139
+ Unlock the mutex that has previously been locked by the same thread
144
140
145
141
@note You cannot call this function from ISR context.
146
142
*/
147
- osStatus unlock ();
143
+ void unlock ();
148
144
149
145
/* * Get the owner the this mutex
150
146
@return the current owner of this mutex.
You can’t perform that action at this time.
0 commit comments