Lines Matching refs:wq_entry

17 void add_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry)  in add_wait_queue()  argument
21 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in add_wait_queue()
23 __add_wait_queue(wq_head, wq_entry); in add_wait_queue()
28 void add_wait_queue_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) in add_wait_queue_exclusive() argument
32 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in add_wait_queue_exclusive()
34 __add_wait_queue_entry_tail(wq_head, wq_entry); in add_wait_queue_exclusive()
39 void remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) in remove_wait_queue() argument
44 __remove_wait_queue(wq_head, wq_entry); in remove_wait_queue()
225 prepare_to_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state) in prepare_to_wait() argument
229 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in prepare_to_wait()
231 if (list_empty(&wq_entry->entry)) in prepare_to_wait()
232 __add_wait_queue(wq_head, wq_entry); in prepare_to_wait()
239 prepare_to_wait_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int s… in prepare_to_wait_exclusive() argument
243 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in prepare_to_wait_exclusive()
245 if (list_empty(&wq_entry->entry)) in prepare_to_wait_exclusive()
246 __add_wait_queue_entry_tail(wq_head, wq_entry); in prepare_to_wait_exclusive()
252 void init_wait_entry(struct wait_queue_entry *wq_entry, int flags) in init_wait_entry() argument
254 wq_entry->flags = flags; in init_wait_entry()
255 wq_entry->private = current; in init_wait_entry()
256 wq_entry->func = autoremove_wake_function; in init_wait_entry()
257 INIT_LIST_HEAD(&wq_entry->entry); in init_wait_entry()
261 long prepare_to_wait_event(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int … in prepare_to_wait_event() argument
280 list_del_init(&wq_entry->entry); in prepare_to_wait_event()
283 if (list_empty(&wq_entry->entry)) { in prepare_to_wait_event()
284 if (wq_entry->flags & WQ_FLAG_EXCLUSIVE) in prepare_to_wait_event()
285 __add_wait_queue_entry_tail(wq_head, wq_entry); in prepare_to_wait_event()
287 __add_wait_queue(wq_head, wq_entry); in prepare_to_wait_event()
347 void finish_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) in finish_wait() argument
365 if (!list_empty_careful(&wq_entry->entry)) { in finish_wait()
367 list_del_init(&wq_entry->entry); in finish_wait()
373 int autoremove_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key) in autoremove_wake_function() argument
375 int ret = default_wake_function(wq_entry, mode, sync, key); in autoremove_wake_function()
378 list_del_init(&wq_entry->entry); in autoremove_wake_function()
409 long wait_woken(struct wait_queue_entry *wq_entry, unsigned mode, long timeout) in wait_woken() argument
418 if (!(wq_entry->flags & WQ_FLAG_WOKEN) && !is_kthread_should_stop()) in wait_woken()
428 smp_store_mb(wq_entry->flags, wq_entry->flags & ~WQ_FLAG_WOKEN); /* B */ in wait_woken()
434 int woken_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key) in woken_wake_function() argument
438 wq_entry->flags |= WQ_FLAG_WOKEN; in woken_wake_function()
440 return default_wake_function(wq_entry, mode, sync, key); in woken_wake_function()