struct IWakeRequeueHook
Defined at line 57 of file ../../zircon/kernel/include/kernel/owned_wait_queue.h
Public Methods
void IWakeRequeueHook ()
Defined at line 59 of file ../../zircon/kernel/include/kernel/owned_wait_queue.h
void IWakeRequeueHook (const IWakeRequeueHook & )
Note; do not force a virtual destructor here. This interface exists
only for the purpose of injecting into various wake operations to be
used during thread selection and to update external bookkeeping.
Instances of it are meant to be stack allocated and should always be
destroyed in the scope where they were created. They are never meant to
be heap allocated or have their lifecycle managed using an IWakeRequeueHook
pointer.
Defined at line 69 of file ../../zircon/kernel/include/kernel/owned_wait_queue.h
void IWakeRequeueHook (IWakeRequeueHook && )
Defined at line 70 of file ../../zircon/kernel/include/kernel/owned_wait_queue.h
IWakeRequeueHook & operator= (const IWakeRequeueHook & )
Defined at line 71 of file ../../zircon/kernel/include/kernel/owned_wait_queue.h
IWakeRequeueHook & operator= (IWakeRequeueHook && )
Defined at line 72 of file ../../zircon/kernel/include/kernel/owned_wait_queue.h
bool Allow (const Thread & t)
The Allow hook is called during the locking phase of a wake or a requeue
operation. The locking code is holding the queue's lock at this point,
but not the thread's lock yet. The thread is still a member of the
queue, meaning we have read-only access to the thread's variables.
The implementation may use this hook to decide if this thread should be
woken or not, returning true if it should be and false otherwise. If
true is returned, the locking operation will attempt to lock the thread
in order to commit it to waking, backing of if needed. If false is
returned, the thread will be left in the queue and the enumeration of
threads in the queue ceases.
Allow may be called multiple times for the same thread during a locking
operation if the code needs to back off and attempt to obtain lock the
set of threads to be woken multiple times.
Defined at line 89 of file ../../zircon/kernel/include/kernel/owned_wait_queue.h
void OnWakeOrRequeue (Thread & t)
OnWakeOrRequeue is called in the second phase of a wake/requeue
operation. At this point, all of the threads to wake have been
identified and successfully locked. This hook is called _just_ before
the thread is removed from its queue, and either unblocked (wake
operation) or moved to a different queue (requeue).
Defined at line 96 of file ../../zircon/kernel/include/kernel/owned_wait_queue.h
Protected Methods
void ~IWakeRequeueHook ()
Defined at line 99 of file ../../zircon/kernel/include/kernel/owned_wait_queue.h