|
Click
|
A set of Tasks scheduled on the same CPU. More...
Public Member Functions | |
| int | thread_id () const |
| Returns this thread's ID. | |
| Master * | master () const |
| Returns this thread's associated Master. | |
| TimerSet & | timer_set () |
| const TimerSet & | timer_set () const |
| SelectSet & | select_set () |
| const SelectSet & | select_set () const |
| bool | active () const |
| Returns whether any tasks are scheduled. | |
| Task * | task_begin () const |
| Returns the beginning of the scheduled task list. | |
| Task * | task_next (Task *task) const |
| Returns the task following task in the scheduled task list. | |
| Task * | task_end () const |
| Returns the end of the scheduled task list. | |
| void | scheduled_tasks (Router *router, Vector< Task * > &x) |
| void | lock_tasks () |
| void | unlock_tasks () |
| void | schedule_block_tasks () |
| void | block_tasks (bool scheduled) |
| void | unblock_tasks () |
| bool | stop_flag () const |
| void | mark_driver_entry () |
| void | driver () |
| void | kill_router (Router *router) |
| bool | greedy () const |
| void | set_greedy (bool g) |
| void | wake () |
| void | run_signals () |
| void | set_thread_state (int state) |
| void | set_thread_state_for_blocking (int delay_type) |
Public Attributes | |
| unsigned | _tasks_per_iter |
| unsigned | _iters_per_os |
A set of Tasks scheduled on the same CPU.
|
inline |
Returns this thread's ID.
The result is >= 0 for true threads, and < 0 for threads that never run any of their associated Tasks.
|
inline |
Returns this thread's associated Master.
|
inline |
Returns whether any tasks are scheduled.
Returns false iff no tasks are scheduled and no events are pending. Since not all events actually matter (for example, a Task might have been scheduled and then subsequently unscheduled), active() may temporarily return true even when no real events are outstanding.
|
inline |
Returns the beginning of the scheduled task list.
Each RouterThread maintains a list of all currently-scheduled tasks. Elements may traverse this list with the task_begin(), task_next(), and task_end() functions, using iterator-like code such as:
The thread's task lock must be held during the traversal, as shown above.
The return value may not be a real task. Test it against task_end() before use.
Returns the task following task in the scheduled task list.
| task | the current task |
The return value may not be a real task. Test it against task_end() before use. However, the task argument must be a real task; do not attempt to call task_next(task_end()).
|
inline |
Returns the end of the scheduled task list.
The return value is not a real task.