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 add_wait_queue_priority() local
43 wq_entry->flags |= WQ_FLAG_EXCLUSIVE | WQ_FLAG_PRIORITY; in add_wait_queue_priority()
44 spin_lock_irqsave(&wq_head->lock, flags); in add_wait_queue_priority()
46 spin_unlock_irqrestore(&wq_head->lock, flags); in add_wait_queue_priority()
52 unsigned long flags; in remove_wait_queue() local
54 spin_lock_irqsave(&wq_head->lock, flags); in remove_wait_queue()
56 spin_unlock_irqrestore(&wq_head->lock, flags); in remove_wait_queue()
89 if (bookmark && (bookmark->flags & WQ_FLAG_BOOKMARK)) { in __wake_up_common()
93 bookmark->flags = 0; in __wake_up_common()
101 unsigned flags = curr->flags; in __wake_up_common() local
104 if (flags & WQ_FLAG_BOOKMARK) in __wake_up_common()
110 if (ret && (flags & WQ_FLAG_EXCLUSIVE) && !--nr_exclusive) in __wake_up_common()
115 bookmark->flags = WQ_FLAG_BOOKMARK; in __wake_up_common()
127 unsigned long flags; in __wake_up_common_lock() local
131 bookmark.flags = 0; in __wake_up_common_lock()
137 spin_lock_irqsave(&wq_head->lock, flags); in __wake_up_common_lock()
140 spin_unlock_irqrestore(&wq_head->lock, flags); in __wake_up_common_lock()
141 } while (bookmark.flags & WQ_FLAG_BOOKMARK); in __wake_up_common_lock()
271 unsigned long flags; in prepare_to_wait() local
273 wq_entry->flags &= ~WQ_FLAG_EXCLUSIVE; in prepare_to_wait()
274 spin_lock_irqsave(&wq_head->lock, flags); in prepare_to_wait()
278 spin_unlock_irqrestore(&wq_head->lock, flags); in prepare_to_wait()
286 unsigned long flags; in prepare_to_wait_exclusive() local
289 wq_entry->flags |= WQ_FLAG_EXCLUSIVE; in prepare_to_wait_exclusive()
290 spin_lock_irqsave(&wq_head->lock, flags); in prepare_to_wait_exclusive()
296 spin_unlock_irqrestore(&wq_head->lock, flags); in prepare_to_wait_exclusive()
301 void init_wait_entry(struct wait_queue_entry *wq_entry, int flags) in init_wait_entry() argument
303 wq_entry->flags = flags; in init_wait_entry()
312 unsigned long flags; in prepare_to_wait_event() local
315 spin_lock_irqsave(&wq_head->lock, flags); in prepare_to_wait_event()
333 if (wq_entry->flags & WQ_FLAG_EXCLUSIVE) in prepare_to_wait_event()
340 spin_unlock_irqrestore(&wq_head->lock, flags); in prepare_to_wait_event()
398 unsigned long flags; in finish_wait() local
415 spin_lock_irqsave(&wq_head->lock, flags); in finish_wait()
417 spin_unlock_irqrestore(&wq_head->lock, flags); in finish_wait()
462 if (!(wq_entry->flags & WQ_FLAG_WOKEN) && !kthread_should_stop_or_park()) in wait_woken()
472 smp_store_mb(wq_entry->flags, wq_entry->flags & ~WQ_FLAG_WOKEN); /* B */ in wait_woken()
482 wq_entry->flags |= WQ_FLAG_WOKEN; in woken_wake_function()