mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
mutex: introduce a MUTEX_ACQUIRE_TIMED helper
This is just based on the previously added semaphore_timedwait.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user