#include <EDDThreadManager.h>
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 |
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.
| 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.
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.
Definition at line 26 of file EDDThreadManager.h.
| 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.
| virtual int tcEDDThreadManager::Sleep | ( | int | anMs, | |
| int | ahHandle | |||
| ) | [pure virtual] |
Utility overload for yeilding a thread via a "sleep" routine.
| anMs | number of milliseconds to sleep for | |
| ahHandle | thread making sleep request |
| 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.
| 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 |
| virtual int tcEDDThreadManager::StopThread | ( | int | ahHandle | ) | [pure virtual] |
This function will terminate a started thread with the specified handle.
| ahHandle | thread handle returned by StartThread |
1.5.8