diff --git a/include/ucore/atomic.h b/include/ucore/atomic.h index c5bbe1d..1d7184d 100644 --- a/include/ucore/atomic.h +++ b/include/ucore/atomic.h @@ -20,7 +20,7 @@ * Atomically decrement *ptr * @return *ptr before the decrement */ -#define UC_ATOMIC_DEC(ptr) UC_ATOMIC_ADD((ptr), -1) +#define UC_ATOMIC_DEC(ptr) UC_ATOMIC_SUB((ptr), 1) /** * Atomically increment *ptr