diff options
-rw-r--r-- | src/arch/riscv/include/atomic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/riscv/include/atomic.h b/src/arch/riscv/include/atomic.h index bc739fbb71..15702e445f 100644 --- a/src/arch/riscv/include/atomic.h +++ b/src/arch/riscv/include/atomic.h @@ -39,7 +39,7 @@ typedef struct { int lock; } spinlock_t; #define atomic_set(ptr, val) (*(volatile typeof(*(ptr)) *)(ptr) = val) #define atomic_read(ptr) (*(volatile typeof(*(ptr)) *)(ptr)) -#ifdef PK_ENABLE_ATOMICS +#ifdef __riscv_atomic # define atomic_add(ptr, inc) __sync_fetch_and_add(ptr, inc) # define atomic_swap(ptr, swp) __sync_lock_test_and_set(ptr, swp) # define atomic_cas(ptr, cmp, swp) __sync_val_compare_and_swap(ptr, cmp, swp) |