mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Having the HAL take a NATIVE_MULTIWAIT_ID without any way to get that structure from extern "C" code is a problem. This makes it so it just takes a MULTIWAIT_ID, and then grabs the native handle inside the HAL. Change-Id: I06da18ba34adcea2f16e4e53da672f38be79e28e Signed-off-by: Dustin Spicuzza <dustin@virtualroadside.com>
22 lines
612 B
C++
22 lines
612 B
C++
#pragma once
|
|
|
|
#include "cpp/priority_condition_variable.h"
|
|
#include "cpp/priority_mutex.h"
|
|
|
|
typedef priority_mutex* MUTEX_ID;
|
|
typedef priority_condition_variable* MULTIWAIT_ID;
|
|
typedef priority_condition_variable::native_handle_type NATIVE_MULTIWAIT_ID;
|
|
|
|
extern "C" {
|
|
MUTEX_ID initializeMutexNormal();
|
|
void deleteMutex(MUTEX_ID sem);
|
|
void takeMutex(MUTEX_ID sem);
|
|
bool tryTakeMutex(MUTEX_ID sem);
|
|
void giveMutex(MUTEX_ID sem);
|
|
|
|
MULTIWAIT_ID initializeMultiWait();
|
|
void deleteMultiWait(MULTIWAIT_ID sem);
|
|
void takeMultiWait(MULTIWAIT_ID sem, MUTEX_ID m);
|
|
void giveMultiWait(MULTIWAIT_ID sem);
|
|
}
|