From d76a22809660dc87b2fbc83e152e74e8bedab3be Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 9 Apr 2024 15:49:05 -0400 Subject: [PATCH] MT#55283 add generic atomic_() macros Change-Id: I56aca3d86663858755b770ede9f3c8e5dcba58f7 --- include/helpers.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/helpers.h b/include/helpers.h index 4193e0f60..8aa697c87 100644 --- a/include/helpers.h +++ b/include/helpers.h @@ -338,6 +338,9 @@ INLINE double atomic64_div(const atomic64 *n, const atomic64 *d) { return (double) atomic64_get(n) / (double) dd; } +#define atomic_get_na(x) __atomic_load_n(x, __ATOMIC_RELAXED) +#define atomic_set_na(x,y) __atomic_store_n(x, y, __ATOMIC_RELAXED) + /*** ATOMIC BITFIELD OPERATIONS ***/