diff options
author | Sven Gothel <[email protected]> | 2015-03-21 21:19:34 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-03-21 21:19:34 +0100 |
commit | e490c3c7f7bb5461cfa78a214827aa534fb43a3e (patch) | |
tree | b86b0291ef529ec6b75cc548d73599fa9c283cd6 /LibOVR/Src/Kernel/OVR_Lockless.cpp | |
parent | 05bb4364bfd9930fb1902efec86446ef035ee07a (diff) |
Bump OculusVR RIFT SDK to 0.4.4
Diffstat (limited to 'LibOVR/Src/Kernel/OVR_Lockless.cpp')
-rw-r--r-- | LibOVR/Src/Kernel/OVR_Lockless.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/LibOVR/Src/Kernel/OVR_Lockless.cpp b/LibOVR/Src/Kernel/OVR_Lockless.cpp index 0f25805..6a5ec6b 100644 --- a/LibOVR/Src/Kernel/OVR_Lockless.cpp +++ b/LibOVR/Src/Kernel/OVR_Lockless.cpp @@ -1,21 +1,20 @@ /************************************************************************************ -PublicHeader: OVR.h Filename : OVR_Lockless.cpp Content : Test logic for lock-less classes Created : December 27, 2013 Authors : Michael Antonov -Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved. +Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved. -Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License"); +Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); you may not use the Oculus VR Rift SDK except in compliance with the License, which is provided at the time of installation or download, or which otherwise accompanies this software in either electronic or hard copy form. You may obtain a copy of the License at -http://www.oculusvr.com/licenses/LICENSE-3.1 +http://www.oculusvr.com/licenses/LICENSE-3.2 Unless required by applicable law or agreed to in writing, the Oculus VR SDK distributed under the License is distributed on an "AS IS" BASIS, @@ -33,13 +32,12 @@ limitations under the License. #include "OVR_Timer.h" #include "OVR_Log.h" - namespace OVR { namespace LocklessTest { const int TestIterations = 10000000; -// Use volatile dummys to force compiler to do spinning. +// Use volatile dummies to force compiler to do spinning. volatile int Dummy1; int Unused1[32]; volatile int Dummy2; @@ -91,7 +89,7 @@ struct TestData volatile bool FirstItemWritten = false; -LocklessUpdater<TestData> TestDataUpdater; +LocklessUpdater<TestData, TestData> TestDataUpdater; // Use this lock to verify that testing algorithm is otherwise correct... Lock TestLock; @@ -108,7 +106,6 @@ class Consumer : public Thread { LogText("LocklessTest::Consumer::Run started.\n"); - while (!FirstItemWritten) { // spin until producer wrote first value... @@ -216,13 +213,10 @@ void StartLocklessTest() producerThread->Start(); consumerThread->Start(); - /* while (!producerThread->IsFinished() && consumerThread->IsFinished()) { Thread::MSleep(500); - } */ - - // TBD: Cleanup + } } |