ERC CISST - cisst software

osaThreadBuddy Class Reference
[OS Abstraction]

#include <osaThreadBuddy.h>

Collaboration diagram for osaThreadBuddy:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implementation of the Thread Proxy object in an OS independent manner.

RTAI provides "buddy" or proxy objects so that any thread created using pthread can be made real time. Our rtsTask class uses this mechanism to provide real time abstract tasks that have a state and a mailbox. This class makes it possible to keep the rtsTask class free from OS dependent stuff, which is moved here. This would also make it easy to provide Soft Real Time tasks in Vanila Linux flavor.

Definition at line 64 of file osaThreadBuddy.h.

Public Member Functions


Constructor & Destructor Documentation

osaThreadBuddy::osaThreadBuddy (  ) 

Constructor. Allocates internal data.

osaThreadBuddy::~osaThreadBuddy (  ) 

Destructor.


Member Function Documentation

void osaThreadBuddy::Create ( const char *  name,
double  period,
int  stack_size = 1024 *256 
)

Create a thread buddy with a name 'name'

Parameters:
name Name of thread buddy, the thread will also be referred using the same name.
period The period of the thread (in nanosecond)
stack_size The stack size allocated to the thread. A default value of 8Kb is used.

void osaThreadBuddy::Delete (  ) 

Delete the thread buddy.

bool osaThreadBuddy::IsPeriodic ( void   )  const [inline]

Return true if thread is periodic. Currently, returns true if the thread was created with a period > 0.

Definition at line 95 of file osaThreadBuddy.h.

void osaThreadBuddy::WaitForPeriod ( void   ) 

Suspend the execution of the real time thread until the next period is reached.

void osaThreadBuddy::WaitForRemainingPeriod ( void   ) 

Suspend the execution of the real time thread for the remainder of the current period.

void osaThreadBuddy::MakeHardRealTime ( void   ) 

Make a thread hard real time.

void osaThreadBuddy::MakeSoftRealTime ( void   ) 

Make a thread soft real time.

void osaThreadBuddy::Resume ( void   ) 

Resume execution of the thread.

void osaThreadBuddy::Suspend ( void   ) 

Suspend execution of the thread.

void osaThreadBuddy::LockStack (  ) 

Lock stack growth

void osaThreadBuddy::UnlockStack (  ) 

Unlock stack


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu