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

/haiku-fatelf/src/tests/add-ons/kernel/file_systems/bfs/r5/
H A DLock.h231 // that a second writer can acquire the lock when there are still readers
236 // Note: this code will break if you actually have 100000 readers
315 int32 readers = atomic_add(&fCount, -MAX_READERS);
318 if (readers < MAX_READERS) {
319 // Acquire sem for all readers currently not using a semaphore.
322 status = acquire_sem_etc(fSemaphore, readers <= 0 ? 1 : MAX_READERS - readers, 0, 0);
331 int32 readers = atomic_add(&fCount, MAX_READERS); local
332 if (readers < 0) {
333 // release sem for all readers onl
[all...]
/haiku-fatelf/src/kits/shared/
H A DRWLockManager.cpp237 // wake up one or more readers -- we unblock more than one reader at
242 thread_id readers[kMaxReaderUnblockCount]; local
252 readers[readerCount++] = waiter->thread;
257 _kern_unblock_threads(readers, readerCount, B_OK);
/haiku-fatelf/src/servers/app/
H A DMultiLocker.cpp216 // increment and retrieve the current count of readers
275 // this will cause new readers to block on fReadSem
276 int32 readers = atomic_add(&fReadCount, -LARGE_NUMBER); local
277 if (readers > 0) {
278 // readers hold the lock - acquire fWriteSem
281 status = acquire_sem_etc(fWriteSem, readers, 0, 0);
357 // this will let new readers acquire the read lock
363 // readers are waiting to acquire the lock
531 /* these two functions manage the debug array for readers */
/haiku-fatelf/src/tests/servers/app/newerClipping/
H A DMultiLocker.cpp138 //increment and retrieve the current count of readers
191 //this will cause new readers to block on fReadSem
192 int32 readers = atomic_add(&fReadCount, -LARGE_NUMBER); local
194 if (readers > 0) {
195 //readers hold the lock - acquire fWriteSem
196 locked = (acquire_sem_etc(fWriteSem, readers, B_DO_NOT_RESCHEDULE,
273 //this will let new readers acquire the read lock
278 //readers are waiting to acquire the lock
395 /* these two functions manage the debug array for readers */
/haiku-fatelf/src/system/libroot/posix/pthread/
H A Dpthread_rwlock.cpp234 // wake up one or more readers -- we unblock more than one reader at
238 thread_id readers[kMaxReaderUnblockCount]; local
249 readers[readerCount++] = waiter->thread;
255 _kern_unblock_threads(readers, readerCount, B_OK);

Completed in 215 milliseconds