class WakeOpHooks
Defined at line 112 of file ../../zircon/kernel/kernel/brwlock.cc
A callback class used to select which threads we want to wake during a wake
operation. Generally, if the first waiter is a writer, we wake just the
writer and assign ownership to them. Otherwise, we wake as many readers as we
can and stop either when we run out, or when we encounter the first writer.
Public Methods
void WakeOpHooks ()
Defined at line 115 of file ../../zircon/kernel/kernel/brwlock.cc
bool Allow (const Thread & t)
This hook is called during the locking phase of the wake operation, and
allows us to determine which threads we want to wake based on their current
state. Returning true selects a thread for waking, and continues the
enumeration of threads (if any). Returning false will stop the
enumeration.
Note that we have not committed to waking any threads yet. We first need
to obtain all of the locks needed for the wake operation. If we fail to
obtain any of the locks, we are going to need to back off from the wake
operation and try again after releasing our queue lock.
Defined at line 127 of file ../../zircon/kernel/kernel/brwlock.cc
Operation op ()
Defined at line 155 of file ../../zircon/kernel/kernel/brwlock.cc
Enumerations
enum Operation
| Name | Value |
|---|---|
| None | 0 |
| WakeWriter | 1 |
| WakeReaders | 2 |
Defined at line 114 of file ../../zircon/kernel/kernel/brwlock.cc