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.
ls
1 parent b53dc66 commit b52a3b31202b2f0bbc6ab4f1efd1bb814cc7bc2c
@Kevin Bracey Kevin Bracey authored on 15 May 2020
Showing 1 changed file
View
rtos/source/Mutex.cpp