Grappa  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 36 of file BasicScheduler.hpp.

Constructor & Destructor Documentation

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

Definition at line 85 of file BasicScheduler.hpp.

Member Function Documentation

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

Implements Grappa::Scheduler.

Definition at line 99 of file BasicScheduler.hpp.

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

Implements Grappa::Scheduler.

Definition at line 95 of file BasicScheduler.hpp.

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

Implements Grappa::Scheduler.

Definition at line 107 of file BasicScheduler.hpp.

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

Implements Grappa::Scheduler.

Definition at line 103 of file BasicScheduler.hpp.

void Grappa::BasicScheduler::run ( )
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)
void Grappa::BasicScheduler::thread_on_exit ( )
inlinevirtual

Implements Grappa::Scheduler.

Definition at line 207 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 152 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 195 of file BasicScheduler.hpp.

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

Implements Grappa::Scheduler.

Definition at line 34 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 168 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 134 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 179 of file BasicScheduler.hpp.


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