25 #ifndef __TPIE_SPIN_LOCK_H__
26 #define __TPIE_SPIN_LOCK_H__
38 if (spin.compare_exchange_weak(expected, 0x80000000))
return;
45 std::atomic_size_t & spin;
61 while (spin.load() >= 0x80000000) {}
66 if (locked) release();
69 std::atomic_size_t & spin;
74 #endif //__TPIE_SPIN_LOCK_H__