Lines Matching refs:flags
20 unsigned long flags; in add_wait_queue() local
22 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in add_wait_queue()
23 spin_lock_irqsave(&wq_head->lock, flags); in add_wait_queue()
25 spin_unlock_irqrestore(&wq_head->lock, flags); in add_wait_queue()
31 unsigned long flags; in add_wait_queue_exclusive() local
33 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in add_wait_queue_exclusive()
34 spin_lock_irqsave(&wq_head->lock, flags); in add_wait_queue_exclusive()
36 spin_unlock_irqrestore(&wq_head->lock, flags); in add_wait_queue_exclusive()
42 unsigned long flags; in remove_wait_queue() local
44 spin_lock_irqsave(&wq_head->lock, flags); in remove_wait_queue()
46 spin_unlock_irqrestore(&wq_head->lock, flags); in remove_wait_queue()
75 if (bookmark && (bookmark->flags & WQ_FLAG_BOOKMARK)) { in __wake_up_common()
79 bookmark->flags = 0; in __wake_up_common()
87 unsigned flags = curr->flags; in __wake_up_common() local
90 if (flags & WQ_FLAG_BOOKMARK) in __wake_up_common()
96 if (ret && (flags & WQ_FLAG_EXCLUSIVE) && !--nr_exclusive) in __wake_up_common()
101 bookmark->flags = WQ_FLAG_BOOKMARK; in __wake_up_common()
113 unsigned long flags; in __wake_up_common_lock() local
116 bookmark.flags = 0; in __wake_up_common_lock()
122 spin_lock_irqsave(&wq_head->lock, flags); in __wake_up_common_lock()
125 spin_unlock_irqrestore(&wq_head->lock, flags); in __wake_up_common_lock()
126 } while (bookmark.flags & WQ_FLAG_BOOKMARK); in __wake_up_common_lock()
224 unsigned long flags; in prepare_to_wait() local
226 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in prepare_to_wait()
227 spin_lock_irqsave(&wq_head->lock, flags); in prepare_to_wait()
231 spin_unlock_irqrestore(&wq_head->lock, flags); in prepare_to_wait()
238 unsigned long flags; in prepare_to_wait_exclusive() local
240 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in prepare_to_wait_exclusive()
241 spin_lock_irqsave(&wq_head->lock, flags); in prepare_to_wait_exclusive()
245 spin_unlock_irqrestore(&wq_head->lock, flags); in prepare_to_wait_exclusive()
249 void init_wait_entry(struct wait_queue_entry *wq_entry, int flags) in init_wait_entry() argument
251 wq_entry->flags = flags; in init_wait_entry()
260 unsigned long flags; in prepare_to_wait_event() local
263 spin_lock_irqsave(&wq_head->lock, flags); in prepare_to_wait_event()
281 if (wq_entry->flags & WQ_FLAG_EXCLUSIVE) in prepare_to_wait_event()
288 spin_unlock_irqrestore(&wq_head->lock, flags); in prepare_to_wait_event()
346 unsigned long flags; in finish_wait() local
363 spin_lock_irqsave(&wq_head->lock, flags); in finish_wait()
365 spin_unlock_irqrestore(&wq_head->lock, flags); in finish_wait()
383 return (current->flags & PF_KTHREAD) && kthread_should_stop(); in is_kthread_should_stop()
415 if (!(wq_entry->flags & WQ_FLAG_WOKEN) && !is_kthread_should_stop()) in wait_woken()
425 smp_store_mb(wq_entry->flags, wq_entry->flags & ~WQ_FLAG_WOKEN); /* B */ in wait_woken()
435 wq_entry->flags |= WQ_FLAG_WOKEN; in woken_wake_function()