mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
artf4156: Replaced synchronization primitives with C++11 equivalents
Change-Id: I90da739347e875efda2a29dd5484b6dda3cd4753
This commit is contained in:
committed by
James Kuszmaul
parent
7f5ee01d3e
commit
3f59f3472a
@@ -45,8 +45,8 @@ MUTEX_ID initializeMutexNormal()
|
||||
|
||||
void deleteMutex(MUTEX_ID sem)
|
||||
{
|
||||
pthread_mutex_destroy(sem);
|
||||
delete sem;
|
||||
pthread_mutex_destroy(sem);
|
||||
delete sem;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,7 +69,7 @@ int8_t tryTakeMutex(MUTEX_ID sem)
|
||||
*/
|
||||
int8_t giveMutex(MUTEX_ID sem)
|
||||
{
|
||||
return pthread_mutex_unlock(sem);
|
||||
return pthread_mutex_unlock(sem);
|
||||
}
|
||||
|
||||
SEMAPHORE_ID initializeSemaphore(uint32_t initial_value) {
|
||||
@@ -134,5 +134,3 @@ int8_t takeMultiWait(MULTIWAIT_ID sem, MUTEX_ID m, int32_t timeout) {
|
||||
int8_t giveMultiWait(MULTIWAIT_ID sem) {
|
||||
return pthread_cond_broadcast(sem);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user