GCS  0.2.3
gu_atomic.h
1 // Copyright (C) 2013 Codership Oy <info@codership.com>
2 
9 #ifndef GU_ATOMIC_H
10 #define GU_ATOMIC_H
11 
12 #ifdef __GNUC__
13 
14 #define gu_sync_fetch_and_add __sync_fetch_and_add
15 #define gu_sync_fetch_and_sub __sync_fetch_and_sub
16 #define gu_sync_fetch_and_or __sync_fetch_and_or
17 #define gu_sync_fetch_and_and __sync_fetch_and_and
18 #define gu_sync_fetch_and_xor __sync_fetch_and_xor
19 #define gu_sync_fetch_and_nand __gu_sync_fetch_and_nand
20 
21 
22 #define gu_sync_add_and_fetch __sync_add_and_fetch
23 #define gu_sync_sub_and_fetch __sync_sub_and_fetch
24 #define gu_sync_or_and_fetch __sync_or_and_fetch
25 #define gu_sync_and_and_fetch __sync_and_and_fetch
26 #define gu_sync_xor_and_fetch __sync_xor_and_fetch
27 #define gu_sync_nand_and_fetch __gu_sync_nand_and_fetch
28 
29 #else /* __GNUC__ */
30 #error "Compiler not supported"
31 #endif
32 
33 #endif /* !GU_ATOMIC_H */