How to make mutex support timeout?
Posted: Sun Oct 22, 2017 2:58 pm
Hello,
I'm hacking ChibiOS with mutex synchronization mechanism and testing demo code in `demo/RT-Posix-simulator`. It's amazing that mutex support PIP and recursive token in such code base.
However, There is a little weird about why mutex in ChibiOS/RT doesn't support timeout? I found that semaphore and condition variable support timeout. If I want to do something like `pthread_mutex_timeoutlock()`, is it possible?
I'm hacking ChibiOS with mutex synchronization mechanism and testing demo code in `demo/RT-Posix-simulator`. It's amazing that mutex support PIP and recursive token in such code base.
However, There is a little weird about why mutex in ChibiOS/RT doesn't support timeout? I found that semaphore and condition variable support timeout. If I want to do something like `pthread_mutex_timeoutlock()`, is it possible?