28 #ifndef OVR_Lockless_h
29 #define OVR_Lockless_h
58 int begin, end,
final;
65 state =
Slots[ end & 1 ];
73 state =
Slots[ (begin & 1) ^ 1 ];
75 if (
final == begin ) {
89 Slots[slot ^ 1] = state;
99 #ifdef OVR_LOCKLESS_TEST
100 void StartLocklessTest();
106 #endif // OVR_Lockless_h
T ExchangeAdd_NoSync(T val)
AtomicInt< int > UpdateEnd
AtomicInt< int > UpdateBegin
T ExchangeAdd_Sync(T val)