Lines Matching +full:key +full:- +full:release
1 // SPDX-License-Identifier: GPL-2.0-only
26 struct wait_bit_key *key = arg; in wake_bit_function() local
29 if (wait_bit->key.flags != key->flags || in wake_bit_function()
30 wait_bit->key.bit_nr != key->bit_nr || in wake_bit_function()
31 test_bit(key->bit_nr, key->flags)) in wake_bit_function()
34 return autoremove_wake_function(wq_entry, mode, sync, key); in wake_bit_function()
39 * To allow interruptible waiting and asynchronous (i.e. non-blocking)
50 prepare_to_wait(wq_head, &wbq_entry->wq_entry, mode); in __wait_on_bit()
51 if (test_bit(wbq_entry->key.bit_nr, wbq_entry->key.flags)) in __wait_on_bit()
52 ret = (*action)(&wbq_entry->key, mode); in __wait_on_bit()
53 } while (test_bit_acquire(wbq_entry->key.bit_nr, wbq_entry->key.flags) && !ret); in __wait_on_bit()
55 finish_wait(wq_head, &wbq_entry->wq_entry); in __wait_on_bit()
78 wq_entry.key.timeout = jiffies + timeout; in out_of_line_wait_on_bit_timeout()
91 prepare_to_wait_exclusive(wq_head, &wbq_entry->wq_entry, mode); in __wait_on_bit_lock()
92 if (test_bit(wbq_entry->key.bit_nr, wbq_entry->key.flags)) { in __wait_on_bit_lock()
93 ret = action(&wbq_entry->key, mode); in __wait_on_bit_lock()
96 * finish_wait() does not necessarily takes wwq_head->lock, in __wait_on_bit_lock()
101 finish_wait(wq_head, &wbq_entry->wq_entry); in __wait_on_bit_lock()
103 if (!test_and_set_bit(wbq_entry->key.bit_nr, wbq_entry->key.flags)) { in __wait_on_bit_lock()
105 finish_wait(wq_head, &wbq_entry->wq_entry); in __wait_on_bit_lock()
126 struct wait_bit_key key = __WAIT_BIT_KEY_INITIALIZER(word, bit); in __wake_up_bit() local
129 __wake_up(wq_head, TASK_NORMAL, 1, &key); in __wake_up_bit()
134 * wake_up_bit - wake up waiters on a bit
141 * The wake-up is sent to tasks in a waitqueue selected by hash from a
150 * If the bit was cleared with a fully-ordered operation, no further
153 * Normally the bit should be cleared by an operation with RELEASE
174 struct wait_bit_key *key = arg; in var_wake_function() local
178 if (wbq_entry->key.flags != key->flags || in var_wake_function()
179 wbq_entry->key.bit_nr != key->bit_nr) in var_wake_function()
182 return autoremove_wake_function(wq_entry, mode, sync, key); in var_wake_function()
188 .key = { in init_wait_var_entry()
190 .bit_nr = -1, in init_wait_var_entry()
196 .entry = LIST_HEAD_INIT(wbq_entry->wq_entry.entry), in init_wait_var_entry()
203 * wake_up_var - wake up waiters on a variable (kernel address)
213 * The wake-up is sent to tasks in a waitqueue selected by hash from a
227 * to be true) by an operation with RELEASE semantics such as
234 __wake_up_bit(__var_waitqueue(var), var, -1); in wake_up_var()
242 return -EINTR; in bit_wait()
252 return -EINTR; in bit_wait_io()
262 if (time_after_eq(now, word->timeout)) in bit_wait_timeout()
263 return -EAGAIN; in bit_wait_timeout()
264 schedule_timeout(word->timeout - now); in bit_wait_timeout()
266 return -EINTR; in bit_wait_timeout()