voidost::PosixThread::endTimer(void)[protected]
Terminates the timer before the timeout period has expired. This prevents the timer from sending it's
SIGALRM and makes the timer available to other threads.
pthread_attr_t*ost::PosixThread::getPthreadAttrPtr(void)[protected]
Access to pthread_attr structure this allows setting/modifying pthread attributes not covered in the
platform independant Thread constructor, e.g. contention scope or scheduling policy
pthread_tost::PosixThread::getPthreadId(void)[protected]
Get pthread_t of underlying posix thread (useful for debugging/logging)
timeout_tost::PosixThread::getTimer(void)const[protected]
Gets the time remaining for the current threads timer before it expires.
Returns
time remaining before timer expires in milliseconds.
virtualvoidost::PosixThread::onDisconnect(void)[protected],[virtual]
A derived method to call when a SIGPIPE is being delivered to a specific thread.
virtualvoidost::PosixThread::onException(void)[protected],[virtual]
A derived method to call when a SIGABRT is being delivered to a specific thread.
virtualvoidost::PosixThread::onHangup(void)[protected],[virtual]
A derived method to handle hangup events being delivered to a specific thread.
virtualvoidost::PosixThread::onPolling(void)[protected],[virtual]
A derived method to handle asynchronous I/O requests delivered to the specified thread.
virtualvoidost::PosixThread::onSignal(int)[protected],[virtual]
A derivable method to call for delivering a signal event to a specified thread.
Parameters- posix signal id.
virtualvoidost::PosixThread::onTimer(void)[protected],[virtual]
A derivable method to call when a SIGALRM is being delivered to a specific thread.
voidost::PosixThread::setSignal(intsigno,boolactive)[protected]
Used to enable or disable a signal within the current thread.
Parameterssigno posix signal id.
active set to true to enable.
voidost::PosixThread::setTimer(timeout_ttimer,boolperiodic=false)[protected]
Used to specify a timeout event that can be delivered to the current thread via SIGALRM. When the timer
expires, the onTimer() method is called for the thread. At present, only one thread timer can be active
at any given time. On some operating systems (including Linux) a timer can be active on each thread.
Parameterstimer timeout in milliseconds.
periodic should the timer be periodic.
Note
currently, periodic timers are only available on systems with a working setitimer call.
staticvoidost::PosixThread::sigInstall(intsigno)[static]
Install a signal handler for use by threads and the OnSignal() event notification handler.
Parameterssigno posix signal id.
voidost::PosixThread::signalMain(signo_tsigno)[inline],[protected]
In the Posix version of Common C++, this can be used to send a signal into the main application thread.
Parameterssigno a posix signal id.
voidost::PosixThread::signalParent(signo_tsigno)[inline],[protected]
In the Posix version of Common C++, this can be used to send a signal into the parent thread of the
current object.
Parameterssigno a posix signal id.
voidost::PosixThread::signalThread(intsigno)[inline]
Delivers a Posix signal to the current thread.
Parameterssigno a posix signal id.