artf4156: Replaced synchronization primitives with C++11 equivalents

Change-Id: I90da739347e875efda2a29dd5484b6dda3cd4753
This commit is contained in:
Tyler Veness
2015-06-25 01:54:20 -07:00
committed by James Kuszmaul
parent 7f5ee01d3e
commit 3f59f3472a
61 changed files with 1293 additions and 768 deletions

View File

@@ -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;
}
/*