The Sequence Toolkit
www.sequence-toolkit.com
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
stk_sync_api.h
Go to the documentation of this file.
1 
4 #ifndef STK_SYNC_API_H
5 #define STK_SYNC_API_H
6 #include "stk_sync.h"
7 #include "stk_common.h"
8 #include <pthread.h>
9 
35 
40 int stk_fetch_and_add( int * variable, int value );
45 #define stk_atomic_increment(_var) stk_fetch_and_add(_var,1)
46 
50 #define stk_atomic_decrement(_var) stk_fetch_and_add(_var,-1)
51 
55 #define stk_atomic_read(_var) stk_fetch_and_add(_var,0)
56 
57 #endif