Skip to content

Commit

Permalink
atomic: fix ordering on gcc (nemequ#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
mochaaP committed Feb 2, 2025
1 parent 4fe62ea commit d0daa88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions atomic/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ typedef psnip_int32_t psnip_atomic_int32;
#define psnip_atomic_int64_compare_exchange(object, expected, desired) \
__atomic_compare_exchange_n(object, expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)
#define psnip_atomic_int64_add(object, operand) \
__atomic_add_fetch(object, operand, __ATOMIC_SEQ_CST)
__atomic_fetch_add(object, operand, __ATOMIC_SEQ_CST)
#define psnip_atomic_int64_sub(object, operand) \
__atomic_sub_fetch(object, operand, __ATOMIC_SEQ_CST)
__atomic_fetch_sub(object, operand, __ATOMIC_SEQ_CST)
#define psnip_atomic_fence() \
__atomic_thread_fence(__ATOMIC_SEQ_CST)

Expand Down

0 comments on commit d0daa88

Please sign in to comment.