The Sequence Toolkit
www.sequence-toolkit.com |
#include <pthread.h>
#include <opa_primitives.h>
Go to the source code of this file.
Macros | |
#define | STK_ATOMIC_INCR(_ptr) OPA_fetch_and_incr_int((OPA_int_t*)_ptr) |
#define | STK_ATOMIC_DECR(_ptr) OPA_fetch_and_decr_int((OPA_int_t*)_ptr) |
#define | STK_ATOMIC_ADD(_ptr, _val) OPA_fetch_and_add_int((OPA_int_t*)_ptr,_val) |
Typedefs | |
typedef pthread_mutex_t | stk_mutex_t |
This header provides the macros and type definitions for atomic and mutex implementations used throughout STK.
#define STK_ATOMIC_ADD | ( | _ptr, | |
_val | |||
) | OPA_fetch_and_add_int((OPA_int_t*)_ptr,_val) |
Atomic add of a number to an integer
#define STK_ATOMIC_DECR | ( | _ptr | ) | OPA_fetch_and_decr_int((OPA_int_t*)_ptr) |
Atomic Decrement an integer
#define STK_ATOMIC_INCR | ( | _ptr | ) | OPA_fetch_and_incr_int((OPA_int_t*)_ptr) |
Atomic Increment an integer
typedef pthread_mutex_t stk_mutex_t |
Definition of a mutex