Hello,
Is there a function that I can use to try to lock a mutex and return true or false if thread managed to acquire the lock?
Best regards,
David.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
Is there a function that I can use to try to lock a mutex and return true or false if thread managed to acquire the lock?
Best regards,
David.
Hi David,
This function does not currently exist. However, SYS/BIOS is an open source product that is easily modifiable and rebuildable. You are free to implement this functionality yourself and try it out.
Steve
Hi David,
In addition to the Steven's suggestion, how about to use a semaphore instead of a mutex? SYS/BIOS Semaphore_pend() has timeout option. If you specify BIOS_NO_WAIT as the option, it will return if it failed to pend (or acquire a lock).
Best Regards,
Atsushi