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 remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) in remove_wait_queue() argument
45 __remove_wait_queue(wq_head, wq_entry); in remove_wait_queue()
239 prepare_to_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state) in prepare_to_wait() argument
243 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in prepare_to_wait()
245 if (list_empty(&wq_entry->entry)) in prepare_to_wait()
246 __add_wait_queue(wq_head, wq_entry); in prepare_to_wait()
253 prepare_to_wait_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int s… in prepare_to_wait_exclusive() argument
257 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in prepare_to_wait_exclusive()
259 if (list_empty(&wq_entry->entry)) in prepare_to_wait_exclusive()
260 __add_wait_queue_entry_tail(wq_head, wq_entry); in prepare_to_wait_exclusive()
266 void init_wait_entry(struct wait_queue_entry *wq_entry, int flags) in init_wait_entry() argument
268 wq_entry->flags = flags; in init_wait_entry()
269 wq_entry->private = current; in init_wait_entry()
270 wq_entry->func = autoremove_wake_function; in init_wait_entry()
271 INIT_LIST_HEAD(&wq_entry->entry); in init_wait_entry()
275 long prepare_to_wait_event(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int … in prepare_to_wait_event() argument
294 list_del_init(&wq_entry->entry); in prepare_to_wait_event()
297 if (list_empty(&wq_entry->entry)) { in prepare_to_wait_event()
298 if (wq_entry->flags & WQ_FLAG_EXCLUSIVE) in prepare_to_wait_event()
299 __add_wait_queue_entry_tail(wq_head, wq_entry); in prepare_to_wait_event()
301 __add_wait_queue(wq_head, wq_entry); in prepare_to_wait_event()
361 void finish_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) in finish_wait() argument
379 if (!list_empty_careful(&wq_entry->entry)) { in finish_wait()
381 list_del_init(&wq_entry->entry); in finish_wait()
387 int autoremove_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key) in autoremove_wake_function() argument
389 int ret = default_wake_function(wq_entry, mode, sync, key); in autoremove_wake_function()
392 list_del_init_careful(&wq_entry->entry); in autoremove_wake_function()
423 long wait_woken(struct wait_queue_entry *wq_entry, unsigned mode, long timeout) in wait_woken() argument
432 if (!(wq_entry->flags & WQ_FLAG_WOKEN) && !is_kthread_should_stop()) in wait_woken()
442 smp_store_mb(wq_entry->flags, wq_entry->flags & ~WQ_FLAG_WOKEN); /* B */ in wait_woken()
448 int woken_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key) in woken_wake_function() argument
452 wq_entry->flags |= WQ_FLAG_WOKEN; in woken_wake_function()
454 return default_wake_function(wq_entry, mode, sync, key); in woken_wake_function()