Raul::AtomicInt Class Reference
Realtime Audio Utility Library

Atomic integer. More...

`#include <AtomicInt.hpp>`

## Public Member Functions

| AtomicInt (int val)
| AtomicInt (const AtomicInt &copy)
int | get () const
void | operator= (int val)
void | operator+= (int val)
void | operator-= (int val)
bool | operator== (int val) const
int | operator+ (int val) const
AtomicInt & | operator++ ()
AtomicInt & | operator-- ()
bool | compare_and_exchange (int old, int val)
| Set value to val iff current value is old. More...
int | exchange_and_add (int val)
| Add val to value. More...
bool | decrement_and_test ()
| Decrement value. More...

## Detailed Description

Atomic integer.

## Member Function Documentation

bool Raul::AtomicInt::compare_and_exchange | ( | int | old,
|  | int | val
| ) |  |

inline

Set value to val iff current value is old.

Returns
  true iff set succeeded.

int Raul::AtomicInt::exchange_and_add | ( | int | val | ) |

inline

Add val to value.

Returns
  value immediately before addition took place.

bool Raul::AtomicInt::decrement_and_test | ( |  | ) |

inline

Decrement value.

Returns
  true if value is now 0, otherwise false.

The documentation for this class was generated from the following file:

- AtomicInt.hpp