30 static inline void rte_mb(
void);
39 static inline void rte_wmb(
void);
48 static inline void rte_rmb(
void);
160 #define rte_compiler_barrier() do { \
161 asm volatile ("" : : : "memory"); \
185 #ifdef RTE_FORCE_INTRINSICS
189 return __sync_bool_compare_and_swap(dst, exp, src);
203 #define RTE_ATOMIC16_INIT(val) { (val) }
225 static inline int16_t
256 __sync_fetch_and_add(&v->
cnt, inc);
270 __sync_fetch_and_sub(&v->
cnt, dec);
282 #ifdef RTE_FORCE_INTRINSICS
299 #ifdef RTE_FORCE_INTRINSICS
320 static inline int16_t
323 return __sync_add_and_fetch(&v->
cnt, inc);
340 static inline int16_t
343 return __sync_sub_and_fetch(&v->
cnt, dec);
359 #ifdef RTE_FORCE_INTRINSICS
362 return __sync_add_and_fetch(&v->
cnt, 1) == 0;
379 #ifdef RTE_FORCE_INTRINSICS
382 return __sync_sub_and_fetch(&v->
cnt, 1) == 0;
399 #ifdef RTE_FORCE_INTRINSICS
438 #ifdef RTE_FORCE_INTRINSICS
442 return __sync_bool_compare_and_swap(dst, exp, src);
456 #define RTE_ATOMIC32_INIT(val) { (val) }
478 static inline int32_t
509 __sync_fetch_and_add(&v->
cnt, inc);
523 __sync_fetch_and_sub(&v->
cnt, dec);
535 #ifdef RTE_FORCE_INTRINSICS
552 #ifdef RTE_FORCE_INTRINSICS
573 static inline int32_t
576 return __sync_add_and_fetch(&v->
cnt, inc);
593 static inline int32_t
596 return __sync_sub_and_fetch(&v->
cnt, dec);
612 #ifdef RTE_FORCE_INTRINSICS
615 return __sync_add_and_fetch(&v->
cnt, 1) == 0;
632 #ifdef RTE_FORCE_INTRINSICS
635 return __sync_sub_and_fetch(&v->
cnt, 1) == 0;
652 #ifdef RTE_FORCE_INTRINSICS
690 #ifdef RTE_FORCE_INTRINSICS
694 return __sync_bool_compare_and_swap(dst, exp, src);
708 #define RTE_ATOMIC64_INIT(val) { (val) }
719 #ifdef RTE_FORCE_INTRINSICS
729 while (success == 0) {
746 static inline int64_t
749 #ifdef RTE_FORCE_INTRINSICS
750 static inline int64_t
759 while (success == 0) {
781 #ifdef RTE_FORCE_INTRINSICS
791 while (success == 0) {
811 #ifdef RTE_FORCE_INTRINSICS
815 __sync_fetch_and_add(&v->
cnt, inc);
830 #ifdef RTE_FORCE_INTRINSICS
834 __sync_fetch_and_sub(&v->
cnt, dec);
847 #ifdef RTE_FORCE_INTRINSICS
864 #ifdef RTE_FORCE_INTRINSICS
885 static inline int64_t
888 #ifdef RTE_FORCE_INTRINSICS
889 static inline int64_t
892 return __sync_add_and_fetch(&v->
cnt, inc);
909 static inline int64_t
912 #ifdef RTE_FORCE_INTRINSICS
913 static inline int64_t
916 return __sync_sub_and_fetch(&v->
cnt, dec);
933 #ifdef RTE_FORCE_INTRINSICS
953 #ifdef RTE_FORCE_INTRINSICS
973 #ifdef RTE_FORCE_INTRINSICS
988 #ifdef RTE_FORCE_INTRINSICS