common FEATURE decrease macro for atomics
@@ -67,6 +67,7 @@ int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *absti
# define ATOMIC_STORE_RELAXED(var, x) atomic_store_explicit(&(var), x, memory_order_relaxed)
# define ATOMIC_LOAD_RELAXED(var) atomic_load_explicit(&(var), memory_order_relaxed)
# define ATOMIC_INC_RELAXED(var) atomic_fetch_add_explicit(&(var), 1, memory_order_relaxed)
+# define ATOMIC_DEC_RELAXED(var) atomic_fetch_sub_explicit(&(var), 1, memory_order_relaxed)
#else
# define ATOMIC_T uint32_t
# define ATOMIC_T_MAX UINT32_MAX
@@ -74,6 +75,7 @@ int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *absti
# define ATOMIC_STORE_RELAXED(var, x) ((var) = (x))
# define ATOMIC_LOAD_RELAXED(var) (var)
# define ATOMIC_INC_RELAXED(var) __sync_fetch_and_add(&(var), 1)
+# define ATOMIC_DEC_RELAXED(var) __sync_fetch_and_sub(&(var), 1)
#endif
/** macro for mutex align check */
