26int Add(
int volatile* var,
int add);
30int Or(
int volatile* var,
int value);
34int And(
int volatile* var,
int value);
38int Xor(
int volatile* var,
int value);
42int Exchange(
int volatile* dest,
int value);
62struct alignas(std::hardware_destructive_interference_size)
AtomicInt
124struct alignas(std::hardware_destructive_interference_size)
AtomicInt64
229 return this->counter == value;
235 return this->counter != value;
241 return this->counter > value;
247 return this->counter >= value;
253 return this->counter < value;
259 return this->counter <= value;
307 this->counter = value;
328 return this->counter == value;
334 return this->counter != value;
340 return this->counter > value;
346 return this->counter >= value;
352 return this->counter < value;
358 return this->counter <= value;
406 this->counter = value;
int64_t int64
Definition interlocked.h:23
Nebula compiler specific defines and configuration.
Definition gccinterlocked.cc:16
int Decrement(int volatile *var)
interlocked decrement, return result
Definition gccinterlocked.cc:157
int And(int volatile *var, int add)
interlocked and
Definition gccinterlocked.cc:58
int Or(int volatile *var, int add)
interlocked or
Definition gccinterlocked.cc:40
void * ExchangePointer(void *volatile *dest, void *value)
interlocked exchange
Definition gccinterlocked.cc:130
int Add(int volatile *var, int add)
interlocked add
Definition gccinterlocked.cc:22
int Exchange(int volatile *dest, int value)
interlocked exchange
Definition gccinterlocked.cc:94
int Xor(int volatile *var, int add)
interlocked xor
Definition gccinterlocked.cc:76
int CompareExchange(int volatile *dest, int exchange, int comparand)
interlocked compare-exchange
Definition gccinterlocked.cc:112
int Increment(int volatile *var)
interlocked increment, return result
Definition gccinterlocked.cc:148
void * CompareExchangePointer(void *volatile *dest, void *exchange, void *comparand)
interlocked compare-exchange pointer
Definition gccinterlocked.cc:139
The Jobs2 system provides a set of threads and a pool of jobs from which threads can pickup work.
Definition jobs2.h:16
int64_t int64
Definition interlocked.h:19
int64 Subtract(int64 subtractor)
Subtract and return the old value.
Definition interlocked.h:380
int64 Add(int64 addend)
Add and return the old value.
Definition interlocked.h:374
bool operator>(int64 value) const
Greater.
Definition interlocked.h:338
void RaceIncrement()
Unsafe increment, only use before or after contention is possible.
Definition interlocked.h:398
AtomicCounter64(int64 initial)
Constructor.
Definition interlocked.h:321
bool operator>=(int64 value) const
Greater or equal.
Definition interlocked.h:344
bool operator!=(int64 value) const
Not-equals.
Definition interlocked.h:332
AtomicCounter64()
Definition interlocked.h:316
void RaceExchange(int64 value)
Unsafe exchange, only use before or after contention is possible.
Definition interlocked.h:404
bool operator==(int64 value) const
Equals.
Definition interlocked.h:326
int64 Exchange(int64 value)
Exchange and return the old value.
Definition interlocked.h:386
int Increment()
Increment and return the new value.
Definition interlocked.h:362
bool operator<(int64 value) const
Less.
Definition interlocked.h:350
int Decrement()
Decrement and return the new value.
Definition interlocked.h:368
bool operator<=(int64 value) const
Less or equal.
Definition interlocked.h:356
void RaceDecrement()
Unsafe decrement, only use before or after contention is possible.
Definition interlocked.h:392
volatile int64 counter
Definition interlocked.h:314
void RaceDecrement()
Unsafe decrement, only use before or after contention is possible.
Definition interlocked.h:293
bool operator>(int value) const
Greater.
Definition interlocked.h:239
bool operator>=(int value) const
Greater or equal.
Definition interlocked.h:245
bool operator!=(int value) const
Not-equals.
Definition interlocked.h:233
int Add(int addend)
Add and return the old value.
Definition interlocked.h:275
int Exchange(int value)
Exchange and return the old value.
Definition interlocked.h:287
void RaceIncrement()
Unsafe increment, only use before or after contention is possible.
Definition interlocked.h:299
int Decrement()
Decrement and return the new value.
Definition interlocked.h:269
AtomicCounter(int initial)
Constructor.
Definition interlocked.h:222
int Increment()
Increment and return the new value.
Definition interlocked.h:263
void RaceExchange(int value)
Unsafe exchange, only use before or after contention is possible.
Definition interlocked.h:305
AtomicCounter()
Definition interlocked.h:217
bool operator<(int value) const
Less.
Definition interlocked.h:251
int Subtract(int subtractor)
Subtract and return the old value.
Definition interlocked.h:281
volatile int counter
Definition interlocked.h:215
bool operator<=(int value) const
Less or equal.
Definition interlocked.h:257
bool operator==(int value) const
Equals.
Definition interlocked.h:227
int64 And(int64 mask)
And.
Definition interlocked.h:158
int64 Increment(int64 incr)
Increment and return new value.
Definition interlocked.h:173
AtomicInt64(int64 initial)
Constructor.
Definition interlocked.h:132
int64 Add(int64 add)
Add.
Definition interlocked.h:143
void operator=(int64 value)
Assignment (unsafe).
Definition interlocked.h:137
AtomicInt64()
Constructor.
Definition interlocked.h:127
int64 CompareExchange(int64 exchange, int64 comparand)
Compare and exchange.
Definition interlocked.h:168
int64 Sub(int64 sub)
Subtract.
Definition interlocked.h:148
volatile int64 value
Definition interlocked.h:183
int64 Decrement(int64 decr)
Decrement and return new value.
Definition interlocked.h:178
int64 Or(int64 mask)
Or.
Definition interlocked.h:153
int64 Exchange(int64 value)
Exchange.
Definition interlocked.h:163
volatile int value
Definition interlocked.h:121
int Increment(int incr)
Increment and return new value.
Definition interlocked.h:111
int Exchange(int value)
Exchange.
Definition interlocked.h:101
int Or(int mask)
Or.
Definition interlocked.h:91
int Decrement(int decr)
Decrement and return new value.
Definition interlocked.h:116
AtomicInt()
Constructor.
Definition interlocked.h:65
int CompareExchange(int exchange, int comparand)
Compare and exchange.
Definition interlocked.h:106
int Sub(int sub)
Subtract.
Definition interlocked.h:86
void operator=(int value)
Assignment (unsafe).
Definition interlocked.h:75
int And(int mask)
And.
Definition interlocked.h:96
AtomicInt(int initial)
Constructor.
Definition interlocked.h:70
int Add(int add)
Add.
Definition interlocked.h:81
void operator=(void *value)
Assignment (unsafe).
Definition interlocked.h:194
AtomicPointer(void *initial)
Constructor.
Definition interlocked.h:189
volatile void * ptr
Definition interlocked.h:209
void * CompareExchange(void *exchange, void *comparand)
Compare and exchange.
Definition interlocked.h:205
void * Exchange(void *value)
Exchange.
Definition interlocked.h:200