Lines Matching refs:q
7 void __init_swait_queue_head(struct swait_queue_head *q, const char *name, in __init_swait_queue_head() argument
10 raw_spin_lock_init(&q->lock); in __init_swait_queue_head()
11 lockdep_set_class_and_name(&q->lock, key, name); in __init_swait_queue_head()
12 INIT_LIST_HEAD(&q->task_list); in __init_swait_queue_head()
22 void swake_up_locked(struct swait_queue_head *q) in swake_up_locked() argument
26 if (list_empty(&q->task_list)) in swake_up_locked()
29 curr = list_first_entry(&q->task_list, typeof(*curr), task_list); in swake_up_locked()
42 void swake_up_all_locked(struct swait_queue_head *q) in swake_up_all_locked() argument
44 while (!list_empty(&q->task_list)) in swake_up_all_locked()
45 swake_up_locked(q); in swake_up_all_locked()
48 void swake_up_one(struct swait_queue_head *q) in swake_up_one() argument
52 raw_spin_lock_irqsave(&q->lock, flags); in swake_up_one()
53 swake_up_locked(q); in swake_up_one()
54 raw_spin_unlock_irqrestore(&q->lock, flags); in swake_up_one()
62 void swake_up_all(struct swait_queue_head *q) in swake_up_all() argument
67 raw_spin_lock_irq(&q->lock); in swake_up_all()
68 list_splice_init(&q->task_list, &tmp); in swake_up_all()
78 raw_spin_unlock_irq(&q->lock); in swake_up_all()
79 raw_spin_lock_irq(&q->lock); in swake_up_all()
81 raw_spin_unlock_irq(&q->lock); in swake_up_all()
85 void __prepare_to_swait(struct swait_queue_head *q, struct swait_queue *wait) in __prepare_to_swait() argument
89 list_add_tail(&wait->task_list, &q->task_list); in __prepare_to_swait()
92 void prepare_to_swait_exclusive(struct swait_queue_head *q, struct swait_queue *wait, int state) in prepare_to_swait_exclusive() argument
96 raw_spin_lock_irqsave(&q->lock, flags); in prepare_to_swait_exclusive()
97 __prepare_to_swait(q, wait); in prepare_to_swait_exclusive()
99 raw_spin_unlock_irqrestore(&q->lock, flags); in prepare_to_swait_exclusive()
103 long prepare_to_swait_event(struct swait_queue_head *q, struct swait_queue *wait, int state) in prepare_to_swait_event() argument
108 raw_spin_lock_irqsave(&q->lock, flags); in prepare_to_swait_event()
117 __prepare_to_swait(q, wait); in prepare_to_swait_event()
120 raw_spin_unlock_irqrestore(&q->lock, flags); in prepare_to_swait_event()
126 void __finish_swait(struct swait_queue_head *q, struct swait_queue *wait) in __finish_swait() argument
133 void finish_swait(struct swait_queue_head *q, struct swait_queue *wait) in finish_swait() argument
140 raw_spin_lock_irqsave(&q->lock, flags); in finish_swait()
142 raw_spin_unlock_irqrestore(&q->lock, flags); in finish_swait()