kinetic-c  v0.12.0
Seagate Kinetic Protocol Client Library for C
Macros
atomic.h File Reference

Go to the source code of this file.

Macros

#define ATOMIC_BOOL_COMPARE_AND_SWAP(PTR, OLD, NEW)   (__sync_bool_compare_and_swap(PTR, OLD, NEW))
 
#define SPIN_ADJ(F, ADJ)
 

Macro Definition Documentation

#define ATOMIC_BOOL_COMPARE_AND_SWAP (   PTR,
  OLD,
  NEW 
)    (__sync_bool_compare_and_swap(PTR, OLD, NEW))

Definition at line 27 of file atomic.h.

#define SPIN_ADJ (   F,
  ADJ 
)
Value:
do { \
for (;;) { \
size_t v = F; \
if (ATOMIC_BOOL_COMPARE_AND_SWAP(&F, v, v + ADJ)) { \
break; \
} \
} \
} while (0)
#define ATOMIC_BOOL_COMPARE_AND_SWAP(PTR, OLD, NEW)
Definition: atomic.h:27

Definition at line 31 of file atomic.h.