Brian Silverman | 26e4e52 | 2015-12-17 01:56:40 -0500 | [diff] [blame^] | 1 | #pragma once |
| 2 | |
| 3 | #include "cpp/priority_condition_variable.h" |
| 4 | #include "cpp/priority_mutex.h" |
| 5 | |
| 6 | typedef priority_mutex* MUTEX_ID; |
| 7 | typedef priority_condition_variable* MULTIWAIT_ID; |
| 8 | typedef priority_condition_variable::native_handle_type NATIVE_MULTIWAIT_ID; |
| 9 | |
| 10 | extern "C" { |
| 11 | MUTEX_ID initializeMutexNormal(); |
| 12 | void deleteMutex(MUTEX_ID sem); |
| 13 | void takeMutex(MUTEX_ID sem); |
| 14 | bool tryTakeMutex(MUTEX_ID sem); |
| 15 | void giveMutex(MUTEX_ID sem); |
| 16 | |
| 17 | MULTIWAIT_ID initializeMultiWait(); |
| 18 | void deleteMultiWait(MULTIWAIT_ID sem); |
| 19 | void takeMultiWait(MULTIWAIT_ID sem, MUTEX_ID m); |
| 20 | void giveMultiWait(MULTIWAIT_ID sem); |
| 21 | } |