From 23fa18eaa71266feff7ba8d83022d9e1cc83c65a Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 10 May 2024 07:42:03 +0000 Subject: [PATCH] disable pwm7 --- kernel/include/linux/sched/wake_q.h | 32 ++++++++++---------------------- 1 files changed, 10 insertions(+), 22 deletions(-) diff --git a/kernel/include/linux/sched/wake_q.h b/kernel/include/linux/sched/wake_q.h index 1c4438f..1e05e56 100644 --- a/kernel/include/linux/sched/wake_q.h +++ b/kernel/include/linux/sched/wake_q.h @@ -24,9 +24,13 @@ * called near the end of a function. Otherwise, the list can be * re-initialized for later re-use by wake_q_init(). * - * Note that this can cause spurious wakeups. schedule() callers + * NOTE that this can cause spurious wakeups. schedule() callers * must ensure the call is done inside a loop, confirming that the * wakeup condition has in fact occurred. + * + * NOTE that there is no guarantee the wakeup will happen any later than the + * wake_q_add() location. Therefore task must be ready to be woken at the + * location of the wake_q_add(). */ #include <linux/sched.h> @@ -49,29 +53,13 @@ head->count = 0; } -extern void __wake_q_add(struct wake_q_head *head, - struct task_struct *task, bool sleeper); -static inline void wake_q_add(struct wake_q_head *head, - struct task_struct *task) +static inline bool wake_q_empty(struct wake_q_head *head) { - __wake_q_add(head, task, false); + return head->first == WAKE_Q_TAIL; } -static inline void wake_q_add_sleeper(struct wake_q_head *head, - struct task_struct *task) -{ - __wake_q_add(head, task, true); -} - -extern void __wake_up_q(struct wake_q_head *head, bool sleeper); -static inline void wake_up_q(struct wake_q_head *head) -{ - __wake_up_q(head, false); -} - -static inline void wake_up_q_sleeper(struct wake_q_head *head) -{ - __wake_up_q(head, true); -} +extern void wake_q_add(struct wake_q_head *head, struct task_struct *task); +extern void wake_q_add_safe(struct wake_q_head *head, struct task_struct *task); +extern void wake_up_q(struct wake_q_head *head); #endif /* _LINUX_SCHED_WAKE_Q_H */ -- Gitblit v1.6.2