]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/uksched: Export static wait queue initializer
authorAndrei Tatar <andrei@unikraft.io>
Mon, 2 Oct 2023 19:04:47 +0000 (21:04 +0200)
committerAndrei Tatar <andrei@unikraft.io>
Tue, 28 Nov 2023 13:59:53 +0000 (14:59 +0100)
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 <andrei@unikraft.io>
lib/uksched/include/uk/wait_types.h

index d5adc01a3ffc7a84242e8c822a6a00c26e400d40..2b0a3e6bc4e8400fcb3030d9121692b2652e86c9 100644 (file)
@@ -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)