mutex: introduce a MUTEX_ACQUIRE_TIMED helper

This is just based on the previously added semaphore_timedwait.
This commit is contained in:
8infy
2024-09-01 19:40:21 +03:00
parent 7e3922c7ad
commit f93470be2a
+3
View File
@@ -11,6 +11,9 @@ typedef semaphore_t mutex_t;
#define MUTEX_ACQUIRE(m, i) \
semaphore_wait(m, i)
#define MUTEX_ACQUIRE_TIMED(m, t, i) \
semaphore_timedwait(m, t, i)
#define MUTEX_RELEASE(m) \
semaphore_signal(m)