diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-08-16 00:27:49 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-08-17 17:57:55 +0300 |
commit | 2c8bb85151d4bad825f8962792e9f53d22db81db (patch) | |
tree | f3b8ed95203ad62860f10428ae9026a4f200da94 | |
parent | 6991436c2b5d91d5358d9914ae2df22b9a1d1dc9 (diff) | |
download | linux-2c8bb85151d4bad825f8962792e9f53d22db81db.tar.xz |
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
-rw-r--r-- | include/linux/sched/wake_q.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/sched/wake_q.h b/include/linux/sched/wake_q.h index 26a2013ac39c..06cd8fb2f409 100644 --- a/include/linux/sched/wake_q.h +++ b/include/linux/sched/wake_q.h @@ -42,8 +42,11 @@ struct wake_q_head { #define WAKE_Q_TAIL ((struct wake_q_node *) 0x01) -#define DEFINE_WAKE_Q(name) \ - struct wake_q_head name = { WAKE_Q_TAIL, &name.first } +#define WAKE_Q_HEAD_INITIALIZER(name) \ + { WAKE_Q_TAIL, &name.first } + +#define DEFINE_WAKE_Q(name) \ + struct wake_q_head name = WAKE_Q_HEAD_INITIALIZER(name) static inline void wake_q_init(struct wake_q_head *head) { |