Grappa  r3821, hash 22cd626d567a91ead5b23302066d1e9469f45c66
Grappa::BasicScheduler Class Reference

A basic Worker Scheduler with just a readyQ and periodicQ. More...

#include <BasicScheduler.hpp>

Inheritance diagram for Grappa::BasicScheduler:
Grappa::Scheduler

Public Member Functions

 BasicScheduler (Worker *master)
 
Workerget_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)
 
Workerthread_wait (void **result)
 
void thread_on_exit ()
 

Detailed Description

A basic Worker Scheduler with just a readyQ and periodicQ.

Definition at line 47 of file BasicScheduler.hpp.

Constructor & Destructor Documentation

Grappa::BasicScheduler::BasicScheduler ( Worker master)
inline

Definition at line 96 of file BasicScheduler.hpp.

Member Function Documentation

void Grappa::BasicScheduler::assignTid ( Worker thr)
inlinevirtual

Implements Grappa::Scheduler.

Definition at line 110 of file BasicScheduler.hpp.

Worker* Grappa::BasicScheduler::get_current_thread ( )
inlinevirtual

Implements Grappa::Scheduler.

Definition at line 106 of file BasicScheduler.hpp.

void Grappa::BasicScheduler::periodic ( Worker thr)
inlinevirtual

Implements Grappa::Scheduler.

Definition at line 118 of file BasicScheduler.hpp.

void Grappa::BasicScheduler::ready ( Worker thr)
inlinevirtual

Implements Grappa::Scheduler.

Definition at line 114 of file BasicScheduler.hpp.

void Grappa::BasicScheduler::run ( )
virtual

run threads until all exit

Implements Grappa::Scheduler.

Definition at line 41 of file BasicScheduler.cpp.

void Grappa::BasicScheduler::thread_join ( Worker wait_on)
void Grappa::BasicScheduler::thread_on_exit ( )
inlinevirtual

Implements Grappa::Scheduler.

Definition at line 218 of file BasicScheduler.hpp.

void Grappa::BasicScheduler::thread_suspend ( )
inlinevirtual

Suspend the current Worker. Worker is not placed on any queue.

Implements Grappa::Scheduler.

Definition at line 163 of file BasicScheduler.hpp.

void Grappa::BasicScheduler::thread_suspend_wake ( Worker next)
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 206 of file BasicScheduler.hpp.

Worker * Grappa::BasicScheduler::thread_wait ( void **  result)
virtual

Implements Grappa::Scheduler.

Definition at line 45 of file BasicScheduler.cpp.

void Grappa::BasicScheduler::thread_wake ( Worker next)
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 179 of file BasicScheduler.hpp.

bool Grappa::BasicScheduler::thread_yield ( )
inlinevirtual

Yield the CPU to the next Worker on your scheduler.

Doesn't ever touch the master Worker.

Implements Grappa::Scheduler.

Definition at line 145 of file BasicScheduler.hpp.

void Grappa::BasicScheduler::thread_yield_wake ( Worker next)
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 190 of file BasicScheduler.hpp.


The documentation for this class was generated from the following files: