class OwnedWaitQueuePool
Defined at line 21 of file ../../zircon/kernel/include/kernel/owned_wait_queue_pool.h
Global pool for OwnedWaitQueue objects.
Public Methods
void OwnedWaitQueuePool ()
Defined at line 23 of file ../../zircon/kernel/include/kernel/owned_wait_queue_pool.h
OwnedWaitQueuePool & Get ()
Returns the global singleton instance.
Defined at line 28 of file ../../zircon/kernel/kernel/owned_wait_queue_pool.cc
zx_status_t Grow ()
Increases the pool size by one if the number of active threads exceeds the current pool
capacity.
May block the caller.
Must be called during Thread construction to ensure pool invariants are upheld.
Returns ZX_ERR_NO_MEMORY if allocation fails.
Defined at line 30 of file ../../zircon/kernel/kernel/owned_wait_queue_pool.cc
SpinLock * GetLock ()
Acquires the pool lock for external synchronization.
If this lock will be held at the same time as OwnedWaitQueue::get_lock(), then
OwnedWaitQueue's lock must be acquired first.
Defined at line 51 of file ../../zircon/kernel/include/kernel/owned_wait_queue_pool.h
void Shrink ()
Decreases the active thread count.
Must be called during Thread destruction or resource cleanup.
Note that this does not currently shrink the size of the pool, it shrinks the number of
active threads tracked by the pool. This allows new threads in the future to reuse already
allocated OwnedWaitQueue's.
Defined at line 53 of file ../../zircon/kernel/kernel/owned_wait_queue_pool.cc
void RecycleLocked (OwnedWaitQueue * queue)
Recycle a queue back to the pool.
The queue must be in a clean state (no owner, no waiters).
Defined at line 70 of file ../../zircon/kernel/kernel/owned_wait_queue_pool.cc
OwnedWaitQueue * BorrowLocked ()
Borrow a queue from the pool.
Defined at line 64 of file ../../zircon/kernel/kernel/owned_wait_queue_pool.cc
int64_t GetExcessCapacityForTest ()
Returns the value of the excess capacity OWQ kcounter.
Defined at line 85 of file ../../zircon/kernel/kernel/owned_wait_queue_pool.cc