21 #if defined(__i386__) || defined(__x86_64) || defined(_M_IX86) || defined(_M_X64) 22 #include <emmintrin.h> 23 #define PAUSE() _mm_pause() 31 void ReMutexSpinlockImpl::
35 while (locking_thread !=
nullptr && locking_thread != current_thread) {
45 bool ReMutexSpinlockImpl::
49 if (locking_thread ==
nullptr || locking_thread == current_thread) {
59 #endif // MUTEX_SPINLOCK PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
get_current_thread
Returns a pointer to the currently-executing Thread object.
A thread; that is, a lightweight process.
static Pointer compare_and_exchange_ptr(Pointer &mem, Pointer old_value, Pointer new_value)
Atomic compare and exchange.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.