Lines Matching refs:q

6 void __init_swait_queue_head(struct swait_queue_head *q, const char *name,  in __init_swait_queue_head()  argument
9 raw_spin_lock_init(&q->lock); in __init_swait_queue_head()
10 lockdep_set_class_and_name(&q->lock, key, name); in __init_swait_queue_head()
11 INIT_LIST_HEAD(&q->task_list); in __init_swait_queue_head()
21 void swake_up_locked(struct swait_queue_head *q, int wake_flags) in swake_up_locked() argument
25 if (list_empty(&q->task_list)) in swake_up_locked()
28 curr = list_first_entry(&q->task_list, typeof(*curr), task_list); in swake_up_locked()
41 void swake_up_all_locked(struct swait_queue_head *q) in swake_up_all_locked() argument
43 while (!list_empty(&q->task_list)) in swake_up_all_locked()
44 swake_up_locked(q, 0); in swake_up_all_locked()
47 void swake_up_one(struct swait_queue_head *q) in swake_up_one() argument
51 raw_spin_lock_irqsave(&q->lock, flags); in swake_up_one()
52 swake_up_locked(q, 0); in swake_up_one()
53 raw_spin_unlock_irqrestore(&q->lock, flags); in swake_up_one()
61 void swake_up_all(struct swait_queue_head *q) in swake_up_all() argument
66 raw_spin_lock_irq(&q->lock); in swake_up_all()
67 list_splice_init(&q->task_list, &tmp); in swake_up_all()
77 raw_spin_unlock_irq(&q->lock); in swake_up_all()
78 raw_spin_lock_irq(&q->lock); in swake_up_all()
80 raw_spin_unlock_irq(&q->lock); in swake_up_all()
84 void __prepare_to_swait(struct swait_queue_head *q, struct swait_queue *wait) in __prepare_to_swait() argument
88 list_add_tail(&wait->task_list, &q->task_list); in __prepare_to_swait()
91 void prepare_to_swait_exclusive(struct swait_queue_head *q, struct swait_queue *wait, int state) in prepare_to_swait_exclusive() argument
95 raw_spin_lock_irqsave(&q->lock, flags); in prepare_to_swait_exclusive()
96 __prepare_to_swait(q, wait); in prepare_to_swait_exclusive()
98 raw_spin_unlock_irqrestore(&q->lock, flags); in prepare_to_swait_exclusive()
102 long prepare_to_swait_event(struct swait_queue_head *q, struct swait_queue *wait, int state) in prepare_to_swait_event() argument
107 raw_spin_lock_irqsave(&q->lock, flags); in prepare_to_swait_event()
116 __prepare_to_swait(q, wait); in prepare_to_swait_event()
119 raw_spin_unlock_irqrestore(&q->lock, flags); in prepare_to_swait_event()
125 void __finish_swait(struct swait_queue_head *q, struct swait_queue *wait) in __finish_swait() argument
132 void finish_swait(struct swait_queue_head *q, struct swait_queue *wait) in finish_swait() argument
139 raw_spin_lock_irqsave(&q->lock, flags); in finish_swait()
141 raw_spin_unlock_irqrestore(&q->lock, flags); in finish_swait()