tcEDDThreadManager Class Reference

OS abtraction layer for thread management. More...

#include <EDDThreadManager.h>

List of all members.

Public Types

enum  teThreadPrio {
  eeHighest, eeHigh, eeMedium, eeLow,
  eeLowest
}
typedef int(* tfThread )(void *, void *, void *)

Public Member Functions

 tcEDDThreadManager (void)
virtual ~tcEDDThreadManager (void)
virtual int StartThread (tfThread apFunc, teThreadPrio aePrio, void *apArg1=NULL, void *apArg2=NULL, void *apArg3=NULL)=0
virtual int StopThread (int ahHandle)=0
virtual int Sleep (int anMs, int ahHandle)=0


Detailed Description

OS abtraction layer for thread management.

OS abstraction layer for thread Management. All applications using the EDD Source library must implement this abstraction.

Definition at line 17 of file EDDThreadManager.h.


Member Typedef Documentation

typedef int(* tcEDDThreadManager::tfThread)(void *, void *, void *)

This typedef represents a thread entry point function prototype. This function pointer is passed to the StartThread method abstraction below.

The function may accept up to 3 arguements, defined as void* for convenience.

Returns:
0 on normal thread termination


Member Enumeration Documentation

This enumeration defines the EDD notional thread priorities that will be provided for thread creation requests. Mapping of these levels to a specific operating system is user defined.

Enumerator:
eeHighest 
eeHigh 
eeMedium 
eeLow 
eeLowest 

Definition at line 26 of file EDDThreadManager.h.


Constructor & Destructor Documentation

tcEDDThreadManager::tcEDDThreadManager ( void   )  [inline]

The default constructor does nothing for this abstraction

Definition at line 36 of file EDDThreadManager.h.

virtual tcEDDThreadManager::~tcEDDThreadManager ( void   )  [inline, virtual]

The default destructor does nothing for this abstraction

Definition at line 39 of file EDDThreadManager.h.


Member Function Documentation

virtual int tcEDDThreadManager::Sleep ( int  anMs,
int  ahHandle 
) [pure virtual]

Utility overload for yeilding a thread via a "sleep" routine.

Parameters:
anMs number of milliseconds to sleep for
ahHandle thread making sleep request
Returns:
0 on success

virtual int tcEDDThreadManager::StartThread ( tfThread  apFunc,
teThreadPrio  aePrio,
void *  apArg1 = NULL,
void *  apArg2 = NULL,
void *  apArg3 = NULL 
) [pure virtual]

Spawn a thread that calls the specified function with specified argument pointers with the specified priority.

Parameters:
apFunc function to call on thread spawn
aePrio priority at which to run the thread
apArg1 user defined arguement
apArg2 user defined arguement
apArg3 user defined arguement
Returns:
thread handle

virtual int tcEDDThreadManager::StopThread ( int  ahHandle  )  [pure virtual]

This function will terminate a started thread with the specified handle.

Parameters:
ahHandle thread handle returned by StartThread
Returns:
0 on success


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

Generated on Sat Apr 25 17:20:45 2009 for EDD by  doxygen 1.5.8