Replace all place which use semaphore as lock with mutex wrapper
See the discussion: https://github.com/apache/incubator-nuttx/pull/5070 and https://www.mail-archive.com/[email protected]/msg07312.html
@xiaoxiang781216 will we improve mutex wrapper to check for holder before releasing a mutex or a separate ticket should be created for that? Currently mutex can be released from a task that is not holding it.
it can be added in the separate PR. Maybe need to enabled in the debug mode to save the space.
I think that probably a good way will be to move priority inheritance from sem to mutex and clean-up priority inheritance APIs for semaphores after we switch to mutexes in code
Yes, this is the safe path to fix the priority inheritance issue.