The Sequence Toolkit
www.sequence-toolkit.com
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
include
stk_sync.h
Go to the documentation of this file.
1
5
#ifndef STK_SYNC_H
6
#define STK_SYNC_H
7
8
#include <pthread.h>
9
#include <opa_primitives.h>
10
12
typedef
pthread_mutex_t
stk_mutex_t
;
13
14
#define STK_ATOMIC_INCR(_ptr) OPA_fetch_and_incr_int((OPA_int_t*)_ptr)
15
#define STK_ATOMIC_DECR(_ptr) OPA_fetch_and_decr_int((OPA_int_t*)_ptr)
16
#define STK_ATOMIC_ADD(_ptr,_val) OPA_fetch_and_add_int((OPA_int_t*)_ptr,_val)
18
#endif
Sequence Toolkit
API, Wed Apr 15 2015 22:32:53