Lines Matching refs:flags

19 	unsigned long flags;  in add_wait_queue()  local
21 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in add_wait_queue()
22 spin_lock_irqsave(&wq_head->lock, flags); in add_wait_queue()
24 spin_unlock_irqrestore(&wq_head->lock, flags); in add_wait_queue()
30 unsigned long flags; in add_wait_queue_exclusive() local
32 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in add_wait_queue_exclusive()
33 spin_lock_irqsave(&wq_head->lock, flags); in add_wait_queue_exclusive()
35 spin_unlock_irqrestore(&wq_head->lock, flags); in add_wait_queue_exclusive()
41 unsigned long flags; in remove_wait_queue() local
43 spin_lock_irqsave(&wq_head->lock, flags); in remove_wait_queue()
45 spin_unlock_irqrestore(&wq_head->lock, flags); in remove_wait_queue()
74 if (bookmark && (bookmark->flags & WQ_FLAG_BOOKMARK)) { in __wake_up_common()
78 bookmark->flags = 0; in __wake_up_common()
86 unsigned flags = curr->flags; in __wake_up_common() local
89 if (flags & WQ_FLAG_BOOKMARK) in __wake_up_common()
95 if (ret && (flags & WQ_FLAG_EXCLUSIVE) && !--nr_exclusive) in __wake_up_common()
100 bookmark->flags = WQ_FLAG_BOOKMARK; in __wake_up_common()
112 unsigned long flags; in __wake_up_common_lock() local
115 bookmark.flags = 0; in __wake_up_common_lock()
120 spin_lock_irqsave(&wq_head->lock, flags); in __wake_up_common_lock()
122 spin_unlock_irqrestore(&wq_head->lock, flags); in __wake_up_common_lock()
124 while (bookmark.flags & WQ_FLAG_BOOKMARK) { in __wake_up_common_lock()
125 spin_lock_irqsave(&wq_head->lock, flags); in __wake_up_common_lock()
128 spin_unlock_irqrestore(&wq_head->lock, flags); in __wake_up_common_lock()
227 unsigned long flags; in prepare_to_wait() local
229 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in prepare_to_wait()
230 spin_lock_irqsave(&wq_head->lock, flags); in prepare_to_wait()
234 spin_unlock_irqrestore(&wq_head->lock, flags); in prepare_to_wait()
241 unsigned long flags; in prepare_to_wait_exclusive() local
243 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in prepare_to_wait_exclusive()
244 spin_lock_irqsave(&wq_head->lock, flags); in prepare_to_wait_exclusive()
248 spin_unlock_irqrestore(&wq_head->lock, flags); 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()
263 unsigned long flags; in prepare_to_wait_event() local
266 spin_lock_irqsave(&wq_head->lock, flags); in prepare_to_wait_event()
284 if (wq_entry->flags & WQ_FLAG_EXCLUSIVE) in prepare_to_wait_event()
291 spin_unlock_irqrestore(&wq_head->lock, flags); in prepare_to_wait_event()
349 unsigned long flags; in finish_wait() local
366 spin_lock_irqsave(&wq_head->lock, flags); in finish_wait()
368 spin_unlock_irqrestore(&wq_head->lock, flags); in finish_wait()
386 return (current->flags & PF_KTHREAD) && kthread_should_stop(); in is_kthread_should_stop()
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()
438 wq_entry->flags |= WQ_FLAG_WOKEN; in woken_wake_function()