From: Andrei Tatar Date: Mon, 2 Oct 2023 19:02:41 +0000 (+0200) Subject: include/: Add static initializer for refcounts X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d592d732f1aaf0736faf3290c8532866f7d428e6;p=unikraft%2Funikraft.git include/: Add static initializer for refcounts Checkpatch-Ignore: SPACING Signed-off-by: Andrei Tatar --- 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. *