From a473473feda55c16ba805cdd5b3fae0c147c35d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Sun, 29 Oct 2023 18:12:31 +0100 Subject: [PATCH] stdatomic.h: Add ATOMIC_VAR_INIT macro. --- include/stdatomic.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/stdatomic.h b/include/stdatomic.h index 3f577439..2d423d1a 100644 --- a/include/stdatomic.h +++ b/include/stdatomic.h @@ -78,6 +78,7 @@ typedef struct { } atomic_flag; #define ATOMIC_FLAG_INIT {0} +#define ATOMIC_VAR_INIT(value) (value) #define atomic_flag_test_and_set_explicit(object, order) \ __atomic_test_and_set((void *)(&((object)->value)), order)