Lines Matching full:reader
57 * If the reader misses the writer's assignment of sem->block, then the in __percpu_down_read_trylock()
58 * writer is guaranteed to see the reader's increment. in __percpu_down_read_trylock()
92 static bool __percpu_rwsem_trylock(struct percpu_rw_semaphore *sem, bool reader) in __percpu_rwsem_trylock() argument
94 if (reader) { in __percpu_rwsem_trylock()
123 bool reader = wq_entry->flags & WQ_FLAG_CUSTOM; in percpu_rwsem_wake_function() local
128 if (!__percpu_rwsem_trylock(sem, reader)) in percpu_rwsem_wake_function()
138 return !reader; /* wake (readers until) 1 writer */ in percpu_rwsem_wake_function()
141 static void percpu_rwsem_wait(struct percpu_rw_semaphore *sem, bool reader) in percpu_rwsem_wait() argument
151 wait = !__percpu_rwsem_trylock(sem, reader); in percpu_rwsem_wait()
153 wq_entry.flags |= WQ_FLAG_EXCLUSIVE | reader * WQ_FLAG_CUSTOM; in percpu_rwsem_wait()
177 percpu_rwsem_wait(sem, /* .reader = */ true); in __percpu_down_read()
238 percpu_rwsem_wait(sem, /* .reader = */ false); in percpu_down_write()
271 * Prod any pending reader/writer to make progress. in percpu_up_write()
277 * reader fast path will be available again. Safe to use outside the in percpu_up_write()