From: Andrei Tatar Date: Mon, 2 Oct 2023 19:04:47 +0000 (+0200) Subject: lib/uksched: Export static wait queue initializer X-Git-Tag: RELEASE-0.16.0~194 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=079e83ac2079ae318b10ace00e59a8d7f38db4ee;p=unikraft%2Funikraft.git lib/uksched: Export static wait queue initializer This change adds the convenience macro `UK_WAIT_QUEUE_INITIALIZER` to the public API of uksched, enabling external code to use initializers for embedded wait queues. Signed-off-by: Andrei Tatar Reviewed-by: Simon Kuenzer Approved-by: Simon Kuenzer GitHub-Closes: #1126 --- diff --git a/lib/uksched/include/uk/wait_types.h b/lib/uksched/include/uk/wait_types.h index d5adc01a3..2b0a3e6bc 100644 --- a/lib/uksched/include/uk/wait_types.h +++ b/lib/uksched/include/uk/wait_types.h @@ -50,6 +50,8 @@ struct uk_waitq { UK_STAILQ_HEAD_INITIALIZER(name.wait_list) \ } +#define UK_WAIT_QUEUE_INITIALIZER(name) __WAIT_QUEUE_INITIALIZER(name) + #define DEFINE_WAIT_QUEUE(name) \ struct uk_waitq name = __WAIT_QUEUE_INITIALIZER(name)