mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +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
@@ -33,10 +33,10 @@ JNIEXPORT jobject JNICALL Java_edu_wpi_first_wpilibj_hal_HALUtil_initializeMutex
|
||||
(JNIEnv * env, jclass)
|
||||
{
|
||||
HALUTIL_LOG(logDEBUG) << "Calling HALUtil initializeMutex";
|
||||
MUTEX_ID* mutexPtr = (MUTEX_ID*)new unsigned char[4];
|
||||
MUTEX_ID* mutexPtr = (MUTEX_ID*)new unsigned char[sizeof(MUTEX_ID)];
|
||||
*mutexPtr = initializeMutexNormal();
|
||||
HALUTIL_LOG(logDEBUG) << "Mutex Ptr = " << *mutexPtr;
|
||||
return env->NewDirectByteBuffer( mutexPtr, 4);
|
||||
return env->NewDirectByteBuffer(mutexPtr, sizeof(MUTEX_ID));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -51,6 +51,7 @@ JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_HALUtil_deleteMutex
|
||||
MUTEX_ID* javaId = (MUTEX_ID*)env->GetDirectBufferAddress(id);
|
||||
HALUTIL_LOG(logDEBUG) << "Mutex Ptr = " << *javaId;
|
||||
deleteMutex( *javaId );
|
||||
delete[] javaId;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user