#include <coil/Mutex.h>
#include <coil/Guard.h>
Go to the source code of this file.
Defines | |
#define | COIL_USES_ATOMIC_OP coil::Mutex __mutex; |
#define | atomic_add(x, y) |
#define | atomic_incr(x) |
#define | atomic_decr(x) |
#define | atomic_exchange_add(x, y) exchange_add(x, y, &__mutex) |
Functions | |
int | exchange_add (int *x, int y, coil::Mutex *mutex) |
$Id$
#define atomic_add | ( | x, | |||
y | ) |
Value:
{ \ coil::Guard<coil::Mutex> guard(__mutex); \ *x = *x + y; \ }
#define atomic_decr | ( | x | ) |
Value:
{ \ coil::Guard<coil::Mutex> guard(__mutex); \ --(*x); \ }
#define atomic_exchange_add | ( | x, | |||
y | ) | exchange_add(x, y, &__mutex) |
Referenced by coil::refcounter_base::remove_ref().
#define atomic_incr | ( | x | ) |
Value:
{ \ coil::Guard<coil::Mutex> guard(__mutex); \ ++(*x); \ }
Referenced by coil::refcounter_base::add_ref().
#define COIL_USES_ATOMIC_OP coil::Mutex __mutex; |
int exchange_add | ( | int * | x, | |
int | y, | |||
coil::Mutex * | mutex | |||
) |