Lines Matching refs:wq
82 void init_waitqueue_head(struct waitqueue_head *wq) in init_waitqueue_head() argument
84 spin_lock_init(&wq->lock); in init_waitqueue_head()
85 INIT_LIST_HEAD(&wq->list); in init_waitqueue_head()
88 void destroy_waitqueue_head(struct waitqueue_head *wq) in destroy_waitqueue_head() argument
90 wake_up_all(wq); in destroy_waitqueue_head()
93 void wake_up_nr(struct waitqueue_head *wq, unsigned int nr) in wake_up_nr() argument
97 spin_lock(&wq->lock); in wake_up_nr()
99 while ( !list_empty(&wq->list) && nr-- ) in wake_up_nr()
101 wqv = list_entry(wq->list.next, struct waitqueue_vcpu, list); in wake_up_nr()
107 spin_unlock(&wq->lock); in wake_up_nr()
110 void wake_up_one(struct waitqueue_head *wq) in wake_up_one() argument
112 wake_up_nr(wq, 1); in wake_up_one()
115 void wake_up_all(struct waitqueue_head *wq) in wake_up_all() argument
117 wake_up_nr(wq, UINT_MAX); in wake_up_all()
227 void prepare_to_wait(struct waitqueue_head *wq) in prepare_to_wait() argument
236 spin_lock(&wq->lock); in prepare_to_wait()
237 list_add_tail(&wqv->list, &wq->list); in prepare_to_wait()
240 spin_unlock(&wq->lock); in prepare_to_wait()
243 void finish_wait(struct waitqueue_head *wq) in finish_wait() argument
253 spin_lock(&wq->lock); in finish_wait()
260 spin_unlock(&wq->lock); in finish_wait()