Lines Matching refs:wq_entry

18 void add_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry)  in add_wait_queue()  argument
22 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in add_wait_queue()
24 __add_wait_queue(wq_head, wq_entry); in add_wait_queue()
29 void add_wait_queue_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) in add_wait_queue_exclusive() argument
33 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in add_wait_queue_exclusive()
35 __add_wait_queue_entry_tail(wq_head, wq_entry); in add_wait_queue_exclusive()
40 void add_wait_queue_priority(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) in add_wait_queue_priority() argument
44 wq_entry->flags |= WQ_FLAG_PRIORITY; in add_wait_queue_priority()
46 __add_wait_queue(wq_head, wq_entry); in add_wait_queue_priority()
52 struct wait_queue_entry *wq_entry) in add_wait_queue_priority_exclusive() argument
56 wq_entry->flags |= WQ_FLAG_EXCLUSIVE | WQ_FLAG_PRIORITY; in add_wait_queue_priority_exclusive()
61 (list_first_entry(head, typeof(*wq_entry), entry)->flags & WQ_FLAG_PRIORITY)) in add_wait_queue_priority_exclusive()
64 list_add(&wq_entry->entry, head); in add_wait_queue_priority_exclusive()
69 void remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) in remove_wait_queue() argument
74 __remove_wait_queue(wq_head, wq_entry); in remove_wait_queue()
248 prepare_to_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state) in prepare_to_wait() argument
252 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in prepare_to_wait()
254 if (list_empty(&wq_entry->entry)) in prepare_to_wait()
255 __add_wait_queue(wq_head, wq_entry); in prepare_to_wait()
263 prepare_to_wait_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int s… in prepare_to_wait_exclusive() argument
268 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in prepare_to_wait_exclusive()
270 if (list_empty(&wq_entry->entry)) { in prepare_to_wait_exclusive()
272 __add_wait_queue_entry_tail(wq_head, wq_entry); in prepare_to_wait_exclusive()
280 void init_wait_entry(struct wait_queue_entry *wq_entry, int flags) in init_wait_entry() argument
282 wq_entry->flags = flags; in init_wait_entry()
283 wq_entry->private = current; in init_wait_entry()
284 wq_entry->func = autoremove_wake_function; in init_wait_entry()
285 INIT_LIST_HEAD(&wq_entry->entry); in init_wait_entry()
289 long prepare_to_wait_event(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int … in prepare_to_wait_event() argument
308 list_del_init(&wq_entry->entry); in prepare_to_wait_event()
311 if (list_empty(&wq_entry->entry)) { in prepare_to_wait_event()
312 if (wq_entry->flags & WQ_FLAG_EXCLUSIVE) in prepare_to_wait_event()
313 __add_wait_queue_entry_tail(wq_head, wq_entry); in prepare_to_wait_event()
315 __add_wait_queue(wq_head, wq_entry); in prepare_to_wait_event()
375 void finish_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) in finish_wait() argument
393 if (!list_empty_careful(&wq_entry->entry)) { in finish_wait()
395 list_del_init(&wq_entry->entry); in finish_wait()
401 int autoremove_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key) in autoremove_wake_function() argument
403 int ret = default_wake_function(wq_entry, mode, sync, key); in autoremove_wake_function()
406 list_del_init_careful(&wq_entry->entry); in autoremove_wake_function()
432 long wait_woken(struct wait_queue_entry *wq_entry, unsigned mode, long timeout) in wait_woken() argument
441 if (!(wq_entry->flags & WQ_FLAG_WOKEN) && !kthread_should_stop_or_park()) in wait_woken()
451 smp_store_mb(wq_entry->flags, wq_entry->flags & ~WQ_FLAG_WOKEN); /* B */ in wait_woken()
457 int woken_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key) in woken_wake_function() argument
461 wq_entry->flags |= WQ_FLAG_WOKEN; in woken_wake_function()
463 return default_wake_function(wq_entry, mode, sync, key); in woken_wake_function()