Searched refs:readers (Results 1 - 25 of 43) sorted by relevance

12

/linux-master/include/linux/
H A Drwbase_rt.h12 atomic_t readers; member in struct:rwbase_rt
18 .readers = ATOMIC_INIT(READER_BIAS), \
25 atomic_set(&(rwbase)->readers, READER_BIAS); \
31 return atomic_read(&rwb->readers) != READER_BIAS;
36 return atomic_read(&rwb->readers) == WRITER_BIAS;
41 return atomic_read(&rwb->readers) > 0;
H A Drwlock_types.h59 atomic_t readers; member in struct:__anon473
H A Dpipe_fs_i.h46 * @readers: number of current readers of this pipe
66 unsigned int readers; member in struct:pipe_inode_info
/linux-master/kernel/locking/
H A Drwbase_rt.c8 * 2) Remove the reader BIAS to force readers into the slow path
9 * 3) Wait until all readers have left the critical section
14 * 2) Set the reader BIAS, so readers can use the fast path again
15 * 3) Unlock rtmutex, to release blocked readers
34 * active readers. A blocked writer would force all newly incoming readers
45 * The lock/unlock of readers can run in fast paths: lock and unlock are only
58 * Increment reader count, if sem->readers < 0, i.e. READER_BIAS is
61 for (r = atomic_read(&rwb->readers); r < 0;) {
62 if (likely(atomic_try_cmpxchg_acquire(&rwb->readers,
[all...]
H A Drwsem.c38 * - Bit 0: RWSEM_READER_OWNED - rwsem may be owned by readers (just a hint)
55 * is involved. Ideally we would like to track all the readers that own
109 * 1) rwsem_mark_wake() for readers -- set, clear
296 * The lock is owned by readers when
301 * Having some reader bits set is not enough to guarantee a readers owned
302 * lock as the readers may be in the process of backing out from the count
350 RWSEM_WAKE_READERS, /* Wake readers only */
362 * Magic number to batch-wakeup waiting readers, even when writers are
409 * Implies rwsem_del_waiter() for all woken readers.
451 * We prefer to do the first reader grant before counting readers
809 int readers = count >> RWSEM_READER_SHIFT; local
[all...]
/linux-master/fs/bcachefs/
H A Dsix.c104 read_count += *per_cpu_ptr(lock->readers, cpu);
154 if (type == SIX_LOCK_read && lock->readers) {
156 this_cpu_inc(*lock->readers); /* signal that we own lock */
163 this_cpu_sub(*lock->readers, !ret);
171 } else if (type == SIX_LOCK_write && lock->readers) {
570 lock->readers) {
572 this_cpu_dec(*lock->readers);
658 if (!lock->readers) {
666 if (lock->readers)
667 this_cpu_dec(*lock->readers);
[all...]
H A Dsix.h18 * not with readers, we can take intent locks at the start of the operation,
141 unsigned __percpu *readers; member in struct:six_lock
/linux-master/fs/btrfs/
H A Dlocking.c125 * - try-lock semantics for readers and writers
336 * if there are pending readers no new writers would be allowed to come in and
342 atomic_set(&lock->readers, 0);
351 if (atomic_read(&lock->readers))
356 /* Ensure writers count is updated before we check for pending readers */
358 if (atomic_read(&lock->readers)) {
371 wait_event(lock->pending_writers, !atomic_read(&lock->readers));
383 atomic_inc(&lock->readers);
402 if (atomic_dec_and_test(&lock->readers))
H A Dlocking.h102 * the threads that hold the lock as readers signal the condition for the wait
119 * the condition and do the signaling acquire the lock as readers (shared
201 atomic_t readers; member in struct:btrfs_drew_lock
H A Dsubpage.h64 * Both data and metadata needs to track how many readers are for the
66 * Data relies on @readers to unlock the page when last reader finished.
70 atomic_t readers; member in struct:btrfs_subpage
H A Dsubpage.c175 atomic_set(&ret->readers, 0);
271 atomic_add(nbits, &subpage->readers);
292 ASSERT(atomic_read(&subpage->readers) >= nbits);
295 last = atomic_sub_and_test(nbits, &subpage->readers);
339 ASSERT(atomic_read(&subpage->readers) == 0);
/linux-master/drivers/misc/ibmasm/
H A Devent.c30 list_for_each_entry(reader, &sp->event_buffer->readers, node)
39 * event readers.
40 * There is no reader marker in the buffer, therefore readers are
73 * Called by event readers (initiated from user space through the file
123 list_add(&reader->node, &sp->event_buffer->readers);
153 INIT_LIST_HEAD(&buffer->readers);
H A Dibmasm.h117 struct list_head readers; member in struct:event_buffer
/linux-master/drivers/hid/
H A Dhid-roccat.c18 * It is inspired by hidraw, but uses only one circular buffer for all readers.
47 struct list_head readers; member in struct:roccat_device
48 /* protects modifications of readers list */
52 * circular_buffer has one writer and multiple readers with their own
191 list_add_tail(&reader->node, &device->readers);
239 * roccat_report_event() - output data to readers
270 list_for_each_entry(reader, &device->readers, node) {
339 INIT_LIST_HEAD(&device->readers);
/linux-master/drivers/soc/aspeed/
H A Daspeed-p2a-ctrl.c65 u32 readers; member in struct:aspeed_p2a_ctrl
192 ctrl->readers += 1;
275 priv->parent->readers -= priv->read;
296 /* If parent->readers is zero and open windows is 0, disable the
299 if (!open_regions && priv->parent->readers == 0)
/linux-master/fs/
H A Dpipe.c72 * FIFOs and Pipes now generate SIGIO for both readers and writers.
424 !READ_ONCE(pipe->readers);
457 if (!pipe->readers) {
498 if (!pipe->readers) {
571 * space. We wake up any readers if necessary, and then
700 if (!pipe->readers)
729 pipe->readers--;
734 if (!pipe->readers != !pipe->writers) {
896 pipe->readers = pipe->writers = 1;
1053 * but that requires that we wake up any other readers/writer
[all...]
H A Dsplice.c210 if (unlikely(!pipe->readers)) {
253 if (unlikely(!pipe->readers)) {
1061 pipe->readers = 1;
1267 if (unlikely(!pipe->readers)) {
1716 if (!pipe->readers) {
1775 if (!opipe->readers) {
1862 * If we put data in the output pipe, wakeup any potential readers.
1899 if (!opipe->readers) {
1953 * If we put data in the output pipe, wakeup any potential readers.
/linux-master/drivers/md/dm-vdo/indexer/
H A Dvolume-index.h183 struct buffered_reader **readers,
H A Dindex-layout.c914 struct buffered_reader *readers[MAX_ZONES]; local
924 result = open_region_reader(layout, &isl->open_chapter, &readers[0]);
928 result = uds_load_open_chapter(index, readers[0]);
929 uds_free_buffered_reader(readers[0]);
935 &readers[zone]);
938 uds_free_buffered_reader(readers[zone - 1]);
944 result = uds_load_volume_index(index->volume_index, readers, isl->zone_count);
946 uds_free_buffered_reader(readers[zone]);
950 result = open_region_reader(layout, &isl->index_page_map, &readers[0]);
954 result = uds_read_index_page_map(index->volume->index_page_map, readers[
[all...]
H A Dvolume-index.c806 struct buffered_reader **readers,
820 result = uds_read_from_buffered_reader(readers[i], buffer,
873 result = uds_read_from_buffered_reader(readers[i], decoded,
891 result = uds_start_restoring_delta_index(&sub_index->delta_index, readers,
983 struct buffered_reader **readers, unsigned int reader_count)
988 result = start_restoring_volume_index(volume_index, readers, reader_count);
992 result = finish_restoring_volume_index(volume_index, readers, reader_count);
999 result = uds_check_guard_delta_lists(readers, reader_count);
805 start_restoring_volume_sub_index(struct volume_sub_index *sub_index, struct buffered_reader **readers, unsigned int reader_count) argument
982 uds_load_volume_index(struct volume_index *volume_index, struct buffered_reader **readers, unsigned int reader_count) argument
/linux-master/include/media/
H A Ddvbdev.h139 * @readers: Initialized by the caller. Each call to open() in Read Only mode
173 int readers; member in struct:dvb_device
/linux-master/drivers/mtd/ubi/
H A Dkapi.c106 * readers and one writer at a time.
163 vol->readers += 1;
173 if (vol->exclusive || vol->writers || vol->readers ||
357 vol->readers -= 1;
H A Dcdev.c50 users = vol->readers + vol->writers + vol->exclusive + vol->metaonly;
56 vol->readers = vol->writers = vol->metaonly = 0;
76 ubi_assert(vol->readers == 0 && vol->writers == 0 && vol->metaonly == 0);
80 vol->readers = 1;
/linux-master/drivers/media/firewire/
H A Dfiredtv-ci.c224 .readers = 1,
/linux-master/net/sunrpc/
H A Dcache.c790 * to the end and may wakeup and preceding readers.
791 * New readers are added to the head. If, on read, an item is found with
807 int readers; member in struct:cache_request
838 * readers on this file */
857 rq->readers++;
891 rq->readers--;
892 if (rq->readers == 0 &&
1062 ->readers--;
1100 if (cr->readers != 0)
1228 crq->readers
[all...]

Completed in 735 milliseconds

12