Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sched/wake_q: Provide WAKE_Q_HEAD_INITIALIZER()

The RT specific spin/rwlock implementation requires special handling of the
to be woken waiters. Provide a WAKE_Q_HEAD_INITIALIZER(), which can be used by
the rtmutex code to implement an RT aware wake_q derivative.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210815211302.429918071@linutronix.de

authored by

Thomas Gleixner and committed by
Ingo Molnar
2c8bb851 6991436c

+5 -2
+5 -2
include/linux/sched/wake_q.h
··· 42 42 43 43 #define WAKE_Q_TAIL ((struct wake_q_node *) 0x01) 44 44 45 - #define DEFINE_WAKE_Q(name) \ 46 - struct wake_q_head name = { WAKE_Q_TAIL, &name.first } 45 + #define WAKE_Q_HEAD_INITIALIZER(name) \ 46 + { WAKE_Q_TAIL, &name.first } 47 + 48 + #define DEFINE_WAKE_Q(name) \ 49 + struct wake_q_head name = WAKE_Q_HEAD_INITIALIZER(name) 47 50 48 51 static inline void wake_q_init(struct wake_q_head *head) 49 52 {