Lines Matching refs:wqv

42     struct waitqueue_vcpu *wqv;  in init_waitqueue_vcpu()  local
44 wqv = xzalloc(struct waitqueue_vcpu); in init_waitqueue_vcpu()
45 if ( wqv == NULL ) in init_waitqueue_vcpu()
49 wqv->stack = alloc_xenheap_page(); in init_waitqueue_vcpu()
50 if ( wqv->stack == NULL ) in init_waitqueue_vcpu()
52 xfree(wqv); in init_waitqueue_vcpu()
57 INIT_LIST_HEAD(&wqv->list); in init_waitqueue_vcpu()
58 wqv->vcpu = v; in init_waitqueue_vcpu()
60 v->waitqueue_vcpu = wqv; in init_waitqueue_vcpu()
67 struct waitqueue_vcpu *wqv; in destroy_waitqueue_vcpu() local
69 wqv = v->waitqueue_vcpu; in destroy_waitqueue_vcpu()
70 if ( wqv == NULL ) in destroy_waitqueue_vcpu()
73 BUG_ON(!list_empty(&wqv->list)); in destroy_waitqueue_vcpu()
75 free_xenheap_page(wqv->stack); in destroy_waitqueue_vcpu()
77 xfree(wqv); in destroy_waitqueue_vcpu()
95 struct waitqueue_vcpu *wqv; in wake_up_nr() local
101 wqv = list_entry(wq->list.next, struct waitqueue_vcpu, list); in wake_up_nr()
102 list_del_init(&wqv->list); in wake_up_nr()
103 vcpu_unpause(wqv->vcpu); in wake_up_nr()
104 put_domain(wqv->vcpu->domain); in wake_up_nr()
122 static void __prepare_to_wait(struct waitqueue_vcpu *wqv) in __prepare_to_wait() argument
129 ASSERT(wqv->esp == 0); in __prepare_to_wait()
162 : "=&S" (wqv->esp), "=&c" (dummy), "=&D" (dummy) in __prepare_to_wait()
163 : "i" (PAGE_SIZE), "0" (0), "1" (cpu_info), "2" (wqv->stack) in __prepare_to_wait()
166 if ( unlikely(wqv->esp == 0) ) in __prepare_to_wait()
178 static void __finish_wait(struct waitqueue_vcpu *wqv) in __finish_wait() argument
180 wqv->esp = NULL; in __finish_wait()
187 struct waitqueue_vcpu *wqv = curr->waitqueue_vcpu; in check_wakeup_from_wait() local
189 ASSERT(list_empty(&wqv->list)); in check_wakeup_from_wait()
191 if ( likely(wqv->esp == NULL) ) in check_wakeup_from_wait()
213 : : "S" (wqv->stack), "D" (wqv->esp), in check_wakeup_from_wait()
214 "c" ((char *)get_cpu_info() - (char *)wqv->esp), in check_wakeup_from_wait()
215 [ip] "r" (*(unsigned long *)wqv->stack) in check_wakeup_from_wait()
222 #define __prepare_to_wait(wqv) ((void)0) argument
223 #define __finish_wait(wqv) ((void)0) argument
230 struct waitqueue_vcpu *wqv = curr->waitqueue_vcpu; in prepare_to_wait() local
233 __prepare_to_wait(wqv); in prepare_to_wait()
235 ASSERT(list_empty(&wqv->list)); in prepare_to_wait()
237 list_add_tail(&wqv->list, &wq->list); in prepare_to_wait()
246 struct waitqueue_vcpu *wqv = curr->waitqueue_vcpu; in finish_wait() local
248 __finish_wait(wqv); in finish_wait()
250 if ( list_empty(&wqv->list) ) in finish_wait()
254 if ( !list_empty(&wqv->list) ) in finish_wait()
256 list_del_init(&wqv->list); in finish_wait()