From d592d732f1aaf0736faf3290c8532866f7d428e6 Mon Sep 17 00:00:00 2001 From: Andrei Tatar Date: Mon, 2 Oct 2023 21:02:41 +0200 Subject: [PATCH] include/: Add static initializer for refcounts Checkpatch-Ignore: SPACING Signed-off-by: Andrei Tatar --- include/uk/refcount.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uk/refcount.h b/include/uk/refcount.h index 24a8f41c1..60ea4b7c8 100644 --- a/include/uk/refcount.h +++ b/include/uk/refcount.h @@ -56,6 +56,8 @@ extern "C" { } while (0) #endif /* CONFIG_LIBUKDEBUG */ +#define UK_REFCOUNT_INITIALIZER(val) ((__atomic){ .counter = (val) }) + /** * Initialize the atomic reference. * -- 2.39.5