summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/arch/wasm32/atomic_arch.h
blob: dd9428c942bf9d9876c594269377eca3be30135f (plain)
1
2
3
4
5
6
7
#define a_barrier() (__sync_synchronize())
#define a_cas(p, t, s) (__sync_val_compare_and_swap((p), (t), (s)))
#define a_crash() (__builtin_trap())
#define a_clz_32 __builtin_clz
#define a_clz_64 __builtin_clzll
#define a_ctz_32 __builtin_ctz
#define a_ctz_64 __builtin_ctzll