sipxportlib  Version 3.3
Public Types | Public Member Functions | Static Public Member Functions | List of all members
OsTaskLinux Class Referenceabstract

#include <OsTaskLinux.h>

Inheritance diagram for OsTaskLinux:
Inheritance graph
[legend]
Collaboration diagram for OsTaskLinux:
Collaboration graph
[legend]

Public Types

enum  LinuxPriorities {
  RT_NO = 0, RT_LOW = 1, RT_NORMAL = 2, RT_HIGH = 3,
  RT_HIGHEST = 4
}
 
- Public Types inherited from OsTaskBase
enum  TaskState { UNINITIALIZED, STARTED, SHUTTING_DOWN, SHUT_DOWN }
 

Public Member Functions

 OsTaskLinux (const UtlString &name="", void *pArg=NULL, const int priority=DEF_PRIO, const int options=DEF_OPTIONS, const int stackSize=DEF_STACKSIZE)
 
virtual ~OsTaskLinux ()
 
virtual OsStatus deleteForce (void)
 enumcode: UNINITIALIZED - no low-level task, no name DB entries enumcode: STARTED - low-level task and name DB entries exist enumcode: SHUTTING_DOWN - requested low-level task shutdown enumcode: SHUT_DOWN - no low-level task, name DB entries still exist More...
 
virtual UtlBoolean restart (void)
 
virtual OsStatus resume (void)
 
virtual int run (void *pArg)=0
 
virtual UtlBoolean start (void)
 
virtual OsStatus suspend (void)
 
virtual OsStatus setErrno (int errno)
 
virtual OsStatus setOptions (int options)
 
virtual OsStatus setPriority (int priority)
 
virtual OsStatus varAdd (int *pVar)
 
virtual OsStatus varDelete (int *pVar)
 
virtual OsStatus varSet (int *pVar, int value)
 
virtual OsStatus getErrno (int &rErrno)
 
virtual int getOptions (void)
 
virtual OsStatus getPriority (int &rPriority)
 
virtual OsStatus varGet (void)
 
virtual OsStatus id (OsTaskId_t &rId)
 
virtual UtlBoolean isSuspended (void)
 
- Public Member Functions inherited from OsTaskBase
virtual void requestShutdown (void)
 
virtual void setUserData (int data)
 
virtual OsStatus syslog (const OsSysLogFacility facility, const OsSysLogPriority priority, const char *format,...)
 
virtual void * getArg (void)
 
virtual const UtlStringgetName (void)
 
virtual int getUserData (void)
 
virtual UtlBoolean isReady (void)
 
virtual UtlBoolean isShutDown (void)
 
virtual UtlBoolean isShuttingDown (void)
 
virtual UtlBoolean isStarted (void)
 
virtual UtlBoolean isUnInitialized (void)
 

Static Public Member Functions

static OsStatus delay (const int milliSecs)
 
static OsStatus safe (void)
 
static OsStatus unsafe (void)
 
static void yield (void)
 
static OsTaskLinuxgetCurrentTask (void)
 
static OsStatus getCurrentTaskId (OsTaskId_t &rid)
 
static OsTaskLinuxgetTaskByName (const UtlString &taskName)
 
static OsTaskLinuxgetTaskById (const pthread_t taskId)
 
static void getIdString_d (UtlString &, OsTaskId_t)
 
static void getIdString_x (UtlString &, OsTaskId_t)
 
static void getIdString_X (UtlString &, OsTaskId_t)
 
- Static Public Member Functions inherited from OsTaskBase
static OsStatus delay (const int milliSecs)
 param: facility - Defines the facility responsible for adding the More...
 
static OsStatus safe (void)
 
static OsStatus unsafe (void)
 
static void yield (void)
 
static OsTaskBasegetCurrentTask (void)
 
static OsStatus getCurrentTaskId (int &rid)
 
static OsTaskBasegetTaskByName (const UtlString &taskName)
 
static OsTaskBasegetTaskById (const int taskId)
 

Additional Inherited Members

- Static Public Attributes inherited from OsTaskBase
static const int DEF_OPTIONS = 0
 
static const int DEF_PRIO = 128
 
static const int DEF_STACKSIZE = 256*1024
 
static const UtlString TASK_PREFIX
 
static const UtlString TASKID_PREFIX
 
static OsAtomicInt taskCount
 
- Protected Member Functions inherited from OsTaskBase
 OsTaskBase (const UtlString &name, void *pArg, const int priority, const int options, const int stackSize)
 
virtual ~OsTaskBase ()
 
virtual UtlBoolean waitUntilShutDown (int milliSecToWait=20000)
 
virtual void ackShutdown (void)
 
- Protected Attributes inherited from OsTaskBase
OsMutex mDataGuard
 
UtlString mName
 
volatile TaskState mState
 

Member Enumeration Documentation

Enumerator
RT_NO 
RT_LOW 
RT_NORMAL 
RT_HIGH 
RT_HIGHEST 

Constructor & Destructor Documentation

OsTaskLinux ( const UtlString name = "",
void *  pArg = NULL,
const int  priority = DEF_PRIO,
const int  options = DEF_OPTIONS,
const int  stackSize = DEF_STACKSIZE 
)
~OsTaskLinux ( )
virtual

Member Function Documentation

OsStatus deleteForce ( void  )
virtual

enumcode: UNINITIALIZED - no low-level task, no name DB entries enumcode: STARTED - low-level task and name DB entries exist enumcode: SHUTTING_DOWN - requested low-level task shutdown enumcode: SHUT_DOWN - no low-level task, name DB entries still exist

Implements OsTaskBase.

UtlBoolean restart ( void  )
virtual

Implements OsTaskBase.

OsStatus resume ( void  )
virtual

Implements OsTaskBase.

virtual int run ( void *  pArg)
pure virtual

Implements OsTaskBase.

UtlBoolean start ( void  )
virtual

Implements OsTaskBase.

OsStatus suspend ( void  )
virtual

Implements OsTaskBase.

OsStatus setErrno ( int  errno)
virtual

Implements OsTaskBase.

OsStatus setOptions ( int  options)
virtual

Implements OsTaskBase.

OsStatus setPriority ( int  priority)
virtual

Implements OsTaskBase.

OsStatus varAdd ( int *  pVar)
virtual

Implements OsTaskBase.

OsStatus varDelete ( int *  pVar)
virtual

Implements OsTaskBase.

OsStatus varSet ( int *  pVar,
int  value 
)
virtual

Implements OsTaskBase.

OsStatus delay ( const int  milliSecs)
static
OsStatus safe ( void  )
static
OsStatus unsafe ( void  )
static
void yield ( void  )
static
OsTaskLinux * getCurrentTask ( void  )
static
OsStatus getCurrentTaskId ( OsTaskId_t &  rid)
static
OsTaskLinux * getTaskByName ( const UtlString taskName)
static
OsTaskLinux * getTaskById ( const pthread_t  taskId)
static
OsStatus getErrno ( int &  rErrno)
virtual

Implements OsTaskBase.

int getOptions ( void  )
virtual

Implements OsTaskBase.

OsStatus getPriority ( int &  rPriority)
virtual

Implements OsTaskBase.

OsStatus varGet ( void  )
virtual

Implements OsTaskBase.

void getIdString_d ( UtlString dest,
OsTaskId_t  tid 
)
static
void getIdString_x ( UtlString dest,
OsTaskId_t  tid 
)
static
void getIdString_X ( UtlString dest,
OsTaskId_t  tid 
)
static
OsStatus id ( OsTaskId_t &  rId)
virtual

Implements OsTaskBase.

UtlBoolean isSuspended ( void  )
virtual

Implements OsTaskBase.