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()
254 prepare_to_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state) in prepare_to_wait() argument
258 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in prepare_to_wait()
260 if (list_empty(&wq_entry->entry)) in prepare_to_wait()
261 __add_wait_queue(wq_head, wq_entry); in prepare_to_wait()
269 prepare_to_wait_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int s… in prepare_to_wait_exclusive() argument
274 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in prepare_to_wait_exclusive()
276 if (list_empty(&wq_entry->entry)) { in prepare_to_wait_exclusive()
278 __add_wait_queue_entry_tail(wq_head, wq_entry); in prepare_to_wait_exclusive()
286 void init_wait_entry(struct wait_queue_entry *wq_entry, int flags) in init_wait_entry() argument
288 wq_entry->flags = flags; in init_wait_entry()
289 wq_entry->private = current; in init_wait_entry()
290 wq_entry->func = autoremove_wake_function; in init_wait_entry()
291 INIT_LIST_HEAD(&wq_entry->entry); in init_wait_entry()
295 long prepare_to_wait_event(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int … in prepare_to_wait_event() argument
314 list_del_init(&wq_entry->entry); in prepare_to_wait_event()
317 if (list_empty(&wq_entry->entry)) { in prepare_to_wait_event()
318 if (wq_entry->flags & WQ_FLAG_EXCLUSIVE) in prepare_to_wait_event()
319 __add_wait_queue_entry_tail(wq_head, wq_entry); in prepare_to_wait_event()
321 __add_wait_queue(wq_head, wq_entry); in prepare_to_wait_event()
381 void finish_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) in finish_wait() argument
399 if (!list_empty_careful(&wq_entry->entry)) { in finish_wait()
401 list_del_init(&wq_entry->entry); in finish_wait()
407 int autoremove_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key) in autoremove_wake_function() argument
409 int ret = default_wake_function(wq_entry, mode, sync, key); in autoremove_wake_function()
412 list_del_init_careful(&wq_entry->entry); in autoremove_wake_function()
443 long wait_woken(struct wait_queue_entry *wq_entry, unsigned mode, long timeout) in wait_woken() argument
452 if (!(wq_entry->flags & WQ_FLAG_WOKEN) && !is_kthread_should_stop()) in wait_woken()
462 smp_store_mb(wq_entry->flags, wq_entry->flags & ~WQ_FLAG_WOKEN); /* B */ in wait_woken()
468 int woken_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key) in woken_wake_function() argument
472 wq_entry->flags |= WQ_FLAG_WOKEN; in woken_wake_function()
474 return default_wake_function(wq_entry, mode, sync, key); in woken_wake_function()