template <typename Thread>
class ThreadBase
Defined at line 76 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
The base thread class from which we expect schedulable thread types to
inherit (following the 'Curiously Recurring Template Pattern'). This class
manages the scheduler-related thread state of interest to this library.
Public Methods
void ThreadBase<Thread> (BandwidthParameters bandwidth, Time start)
Defined at line 78 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
Duration period ()
Defined at line 90 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
Duration firm_capacity ()
Defined at line 92 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
FlexibleWeight flexible_weight ()
Defined at line 94 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
Utilization firm_utilization ()
The total proportion of the period in which the thread is expected to run
in order to complete its required work.
Defined at line 98 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
Time start ()
The start of the thread's current activation period.
Defined at line 101 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
Time finish ()
The end of the thread's current activation period.
Defined at line 104 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
Duration time_slice_used ()
The cumulative amount of scheduled time within the current activation
period.
Defined at line 108 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
ThreadState state ()
Returns the scheduling state of the thread.
Defined at line 111 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
void set_state (ThreadState state)
Sets the scheduling state of the thread.
Defined at line 114 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
bool IsActive (Time now)
Whether the thread is active at the provided time (i.e., whether that time
falls within the current activation period).
Defined at line 118 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
void Reactivate (Time now)
Reactivates the thread in a new activation period. If the provided time is
before the current period ends, then the new period will naturally begin at
the current's finish time; otherwise, the thread missed out on being
reactivated along the current period boundary (e.g., due to having been
blocked for an extended period of time) and the activation period will be
reset starting at `now`.
Defined at line 126 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
void Tick (Duration elapsed)
Accounts for the time in which the thread was executed (as measured outside
this library).
Defined at line 133 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h
bool IsQueued ()
Whether the thread is currently queued to be scheduled (in a RunQueue).
Defined at line 136 of file ../../zircon/kernel/lib/sched/include/lib/sched/thread-base.h