21 #if defined(__i386__) || defined(__x86_64) || defined(_M_IX86) || defined(_M_X64) 22 #include <emmintrin.h> 23 #define PAUSE() _mm_pause() 31 void ConditionVarSpinlockImpl::
33 AtomicAdjust::Integer current = _event;
46 void ConditionVarSpinlockImpl::
47 wait(
double timeout) {
49 double end_time = clock->get_short_time() + timeout;
51 AtomicAdjust::Integer current = _event;
54 while (
AtomicAdjust::get(_event) == current && clock->get_short_time() < end_time) {
63 #endif // MUTEX_SPINLOCK static TrueClock * get_global_ptr()
Returns a pointer to the one TrueClock object in the world.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static Integer get(const Integer &var)
Atomically retrieves the snapshot value of the indicated variable.
An interface to whatever real-time clock we might have available in the current environment.