OVR_Callbacks.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /************************************************************************************
  2. PublicHeader: Kernel
  3. Filename : OVR_Callbacks.cpp
  4. Content : Callback library
  5. Created : Nov 17, 2014
  6. Author : Chris Taylor
  7. Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
  8. Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
  9. you may not use the Oculus VR Rift SDK except in compliance with the License,
  10. which is provided at the time of installation or download, or which
  11. otherwise accompanies this software in either electronic or hard copy form.
  12. You may obtain a copy of the License at
  13. http://www.oculusvr.com/licenses/LICENSE-3.2
  14. Unless required by applicable law or agreed to in writing, the Oculus VR SDK
  15. distributed under the License is distributed on an "AS IS" BASIS,
  16. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. See the License for the specific language governing permissions and
  18. limitations under the License.
  19. ************************************************************************************/
  20. #include "OVR_Callbacks.h"
  21. namespace OVR {
  22. // Global emitter lock
  23. //
  24. // Add/remove operations on callbacks happen infrequently, and are already fairly
  25. // serialized in order of construction by design. Therefore contention for this
  26. // lock between call()/shutdown() is the main concern and is also rare.
  27. Lock* CallbackEmitterBase::GetEmitterLock()
  28. {
  29. static Lock lock;
  30. return &lock;
  31. }
  32. } // namespace OVR