Mutex::unlock - decrement _count inside lock
`Mutex::unlock` was decrementing the `_count` member after releasing the mutex, which meant it was unprotected, exposing a race that could corrupt the count. This could lead to an assert in `ConditionVariable::wait`, which checks that the mutex count is one. |
---|
|
rtos/source/Mutex.cpp |
---|