|
Yate
|
A group of RTP processors handled by the same thread. More...
#include <yatertp.h>
Public Member Functions | |
| RTPGroup (int msec=0, Priority prio=Normal, const String &affinity=String::empty()) | |
| virtual | ~RTPGroup () |
| virtual void | cleanup () |
| virtual void | run () |
| void | join (RTPProcessor *proc) |
| void | part (RTPProcessor *proc) |
Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () |
| virtual bool | alive () const |
| virtual void | destruct () |
| virtual const String & | toString () const |
| virtual const String & | traceId () const |
| virtual void * | getObject (const String &name) const |
| NamedCounter * | getObjCounter () const |
| NamedCounter * | setObjCounter (NamedCounter *counter) |
Public Member Functions inherited from Mutex | |
| Mutex (bool recursive=false, const char *name=0) | |
| Mutex (const Mutex &original) | |
| ~Mutex () | |
| Mutex & | operator= (const Mutex &original) |
| virtual bool | lock (long maxwait=-1) |
| virtual bool | unlock () |
| virtual bool | locked () const |
| const char * | owner () const |
| bool | recursive () const |
Public Member Functions inherited from Lockable | |
| virtual | ~Lockable () |
| virtual bool | check (long maxwait=-1) |
| virtual bool | unlockAll () |
Public Member Functions inherited from Thread | |
| bool | startup () |
| bool | error () const |
| bool | running () const |
| int | getAffinity (DataBlock &outCpuMask) |
| int | setAffinity (const String &cpus) |
| int | setAffinity (const DataBlock &mask) |
| int | locks () const |
| bool | locked () const |
| const char * | name () const |
| void | cancel (bool hard=false) |
| bool | isCurrent () const |
| NamedCounter * | getObjCounter () const |
| NamedCounter * | setObjCounter (NamedCounter *counter) |
Public Member Functions inherited from Runnable | |
| virtual | ~Runnable () |
Static Public Member Functions | |
| static void | setMinSleep (int msec) |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
Static Public Member Functions inherited from Mutex | |
| static int | count () |
| static int | locks () |
| static bool | efficientTimedLock () |
Static Public Member Functions inherited from Lockable | |
| static void | wait (unsigned long maxwait) |
| static unsigned long | wait () |
| static void | startUsingNow () |
| static void | enableSafety (bool safe=true) |
| static bool | safety () |
Static Public Member Functions inherited from Thread | |
| static const char * | currentName () |
| static int | getCurrentAffinity (DataBlock &outCpuMask) |
| static int | getCurrentAffinity (String &outCpus, bool hex=false) |
| static int | setCurrentAffinity (const String &cpus) |
| static int | setCurrentAffinity (const DataBlock &mask) |
| static bool | parseCPUMask (const String &cpus, DataBlock &mask) |
| static void | printCPUMask (const DataBlock &mask, String &str, bool hexa=true) |
| static void | yield (bool exitCheck=false) |
| static void | idle (bool exitCheck=false) |
| static void | sleep (unsigned int sec, bool exitCheck=false) |
| static void | msleep (unsigned long msec, bool exitCheck=false) |
| static void | usleep (unsigned long usec, bool exitCheck=false) |
| static unsigned long | idleUsec () |
| static unsigned long | idleMsec () |
| static void | idleMsec (unsigned long msec) |
| static Thread * | current () |
| static int | count () |
| static bool | check (bool exitNow=true) |
| static void | exit () |
| static NamedCounter * | getCurrentObjCounter (bool always=false) |
| static NamedCounter * | setCurrentObjCounter (NamedCounter *counter) |
| static Priority | priority (const char *name, Priority defvalue=Normal) |
| static const char * | priority (Priority prio) |
| static void | killall () |
| static void | preExec () |
| static int | lastError () |
| static bool | errorString (String &buffer) |
| static bool | errorString (String &buffer, int code) |
Friends | |
| class | RTPProcessor |
Additional Inherited Members | |
Public Types inherited from Thread | |
| enum | Priority { Lowest , Low , Normal , High , Highest } |
Protected Member Functions inherited from Thread | |
| Thread (const char *name=0, Priority prio=Normal) | |
| Thread (const char *name, const char *prio) | |
| virtual | ~Thread () |
A group of RTP processors handled by the same thread.
Several possibly related RTP processors share the same RTP group which holds the thread that keeps them running.
| RTPGroup | ( | int | msec = 0, |
| Priority | prio = Normal, | ||
| const String & | affinity = String::empty() ) |
Constructor
| msec | Minimum time to sleep in loop in milliseconds |
| prio | Thread priority to run this group |
| affinity | Comma-separated list of CPUs and/or CPU range on which the thread should run on |
References String::empty().
|
virtual |
Group destructor, removes itself from all remaining processors
|
virtual |
Inherited thread cleanup
Reimplemented from Thread.
| void join | ( | RTPProcessor * | proc | ) |
Add a RTP processor to this group
| proc | Pointer to the RTP processor to add |
| void part | ( | RTPProcessor * | proc | ) |
Remove a RTP processor from this group
| proc | Pointer to the RTP processor to remove |
|
virtual |
Inherited thread run method
Implements Runnable.
|
static |
Set the system global minimum time to sleep in loop
| msec | Minimum time to sleep in loop in milliseconds |