A basic Worker Scheduler with just a readyQ and periodicQ. More...
#include <BasicScheduler.hpp>
Public Member Functions | |
BasicScheduler (Worker *master) | |
Worker * | get_current_thread () |
void | assignTid (Worker *thr) |
void | ready (Worker *thr) |
void | periodic (Worker *thr) |
void | run () |
run threads until all exit More... | |
bool | thread_yield () |
Yield the CPU to the next Worker on your scheduler. More... | |
void | thread_suspend () |
Suspend the current Worker. Worker is not placed on any queue. More... | |
void | thread_wake (Worker *next) |
Wake a suspended Worker by putting it on the run queue. More... | |
void | thread_yield_wake (Worker *next) |
Yield the current Worker and wake a suspended thread. More... | |
void | thread_suspend_wake (Worker *next) |
Suspend current Worker and wake a suspended thread. More... | |
void | thread_join (Worker *wait_on) |
Worker * | thread_wait (void **result) |
void | thread_on_exit () |
A basic Worker Scheduler with just a readyQ and periodicQ.
Definition at line 36 of file BasicScheduler.hpp.
|
inline |
Definition at line 85 of file BasicScheduler.hpp.
|
inlinevirtual |
Implements Grappa::Scheduler.
Definition at line 99 of file BasicScheduler.hpp.
|
inlinevirtual |
Implements Grappa::Scheduler.
Definition at line 95 of file BasicScheduler.hpp.
|
inlinevirtual |
Implements Grappa::Scheduler.
Definition at line 107 of file BasicScheduler.hpp.
|
inlinevirtual |
Implements Grappa::Scheduler.
Definition at line 103 of file BasicScheduler.hpp.
|
virtual |
run threads until all exit
Implements Grappa::Scheduler.
Definition at line 30 of file BasicScheduler.cpp.
void Grappa::BasicScheduler::thread_join | ( | Worker * | wait_on | ) |
|
inlinevirtual |
Implements Grappa::Scheduler.
Definition at line 207 of file BasicScheduler.hpp.
|
inlinevirtual |
Suspend the current Worker. Worker is not placed on any queue.
Implements Grappa::Scheduler.
Definition at line 152 of file BasicScheduler.hpp.
|
inlinevirtual |
Suspend current Worker and wake a suspended thread.
For now, waking a running Worker is a fatal error. For now, waking a queued Worker is also a fatal error.
Implements Grappa::Scheduler.
Definition at line 195 of file BasicScheduler.hpp.
|
virtual |
Implements Grappa::Scheduler.
Definition at line 34 of file BasicScheduler.cpp.
|
inlinevirtual |
Wake a suspended Worker by putting it on the run queue.
For now, waking a running Worker is a fatal error. For now, waking a queued Worker is also a fatal error. For now, can only wake a Worker on your scheduler
Implements Grappa::Scheduler.
Definition at line 168 of file BasicScheduler.hpp.
|
inlinevirtual |
Yield the CPU to the next Worker on your scheduler.
Doesn't ever touch the master Worker.
Implements Grappa::Scheduler.
Definition at line 134 of file BasicScheduler.hpp.
|
inlinevirtual |
Yield the current Worker and wake a suspended thread.
For now, waking a running Worker is a fatal error. For now, waking a queued Worker is also a fatal error.
Implements Grappa::Scheduler.
Definition at line 179 of file BasicScheduler.hpp.