#include <coil/Mutex.h>
#include <coil/Guard.h>
Go to the source code of this file.
Defines | |
#define | atomic_add(x, y) |
#define | atomic_decr(x) |
#define | atomic_exchange_add(x, y) exchange_add(x, y, &__mutex) |
#define | atomic_incr(x) |
Functions | |
int | exchange_add (int *x, int y, coil::Mutex *mutex) |
#define atomic_add | ( | x, | |
y | |||
) |
{ \ coil::Guard<coil::Mutex> guard(__mutex); \ x = x + y; \ }
Definition at line 32 of file win32/coil/atomic.h.
#define atomic_decr | ( | x | ) |
{ \ coil::Guard<coil::Mutex> guard(__mutex); \ --x; \ }
Definition at line 44 of file win32/coil/atomic.h.
#define atomic_exchange_add | ( | x, | |
y | |||
) | exchange_add(x, y, &__mutex) |
Definition at line 58 of file win32/coil/atomic.h.
#define atomic_incr | ( | x | ) |
{ \ coil::Guard<coil::Mutex> guard(__mutex); \ ++x; \ }
Definition at line 38 of file win32/coil/atomic.h.
int exchange_add | ( | int * | x, |
int | y, | ||
coil::Mutex * | mutex | ||
) |
Definition at line 50 of file win32/coil/atomic.h.