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_EXCLUSIVE | WQ_FLAG_PRIORITY; in add_wait_queue_priority()
46 __add_wait_queue(wq_head, wq_entry); in add_wait_queue_priority()
51 void remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) in remove_wait_queue() argument
56 __remove_wait_queue(wq_head, wq_entry); in remove_wait_queue()
261 prepare_to_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state) in prepare_to_wait() argument
265 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in prepare_to_wait()
267 if (list_empty(&wq_entry->entry)) in prepare_to_wait()
268 __add_wait_queue(wq_head, wq_entry); in prepare_to_wait()
276 prepare_to_wait_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int s… in prepare_to_wait_exclusive() argument
281 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in prepare_to_wait_exclusive()
283 if (list_empty(&wq_entry->entry)) { in prepare_to_wait_exclusive()
285 __add_wait_queue_entry_tail(wq_head, wq_entry); in prepare_to_wait_exclusive()
293 void init_wait_entry(struct wait_queue_entry *wq_entry, int flags) in init_wait_entry() argument
295 wq_entry->flags = flags; in init_wait_entry()
296 wq_entry->private = current; in init_wait_entry()
297 wq_entry->func = autoremove_wake_function; in init_wait_entry()
298 INIT_LIST_HEAD(&wq_entry->entry); in init_wait_entry()
302 long prepare_to_wait_event(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int … in prepare_to_wait_event() argument
321 list_del_init(&wq_entry->entry); in prepare_to_wait_event()
324 if (list_empty(&wq_entry->entry)) { in prepare_to_wait_event()
325 if (wq_entry->flags & WQ_FLAG_EXCLUSIVE) in prepare_to_wait_event()
326 __add_wait_queue_entry_tail(wq_head, wq_entry); in prepare_to_wait_event()
328 __add_wait_queue(wq_head, wq_entry); in prepare_to_wait_event()
388 void finish_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) in finish_wait() argument
406 if (!list_empty_careful(&wq_entry->entry)) { in finish_wait()
408 list_del_init(&wq_entry->entry); in finish_wait()
414 int autoremove_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key) in autoremove_wake_function() argument
416 int ret = default_wake_function(wq_entry, mode, sync, key); in autoremove_wake_function()
419 list_del_init_careful(&wq_entry->entry); in autoremove_wake_function()
450 long wait_woken(struct wait_queue_entry *wq_entry, unsigned mode, long timeout) in wait_woken() argument
459 if (!(wq_entry->flags & WQ_FLAG_WOKEN) && !is_kthread_should_stop()) in wait_woken()
469 smp_store_mb(wq_entry->flags, wq_entry->flags & ~WQ_FLAG_WOKEN); /* B */ in wait_woken()
475 int woken_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key) in woken_wake_function() argument
479 wq_entry->flags |= WQ_FLAG_WOKEN; in woken_wake_function()
481 return default_wake_function(wq_entry, mode, sync, key); in woken_wake_function()