.TH "thread.h" 3 "Sun Dec 27 2020" "GNU CommonC++" \" -*- nroff -*- .ad l .nh .SH NAME thread.h \- Synchronization and threading services\&. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br .SS "Classes" .in +1c .ti -1c .RI "class \fBost::Mutex\fP" .br .RI "The \fBMutex\fP class is used to protect a section of code so that at any given time only a single thread can perform the protected operation\&. " .ti -1c .RI "class \fBost::MutexLock\fP" .br .RI "The \fBMutexLock\fP class is used to protect a section of code so that at any given time only a single thread can perform the protected operation\&. " .ti -1c .RI "class \fBost::ThreadLock\fP" .br .RI "The \fBThreadLock\fP class impliments a thread rwlock for optimal reader performance on systems which have rwlock support, and reverts to a simple mutex for those that do not\&. " .ti -1c .RI "class \fBost::ReadLock\fP" .br .RI "The \fBReadLock\fP class is used to protect a section of code through a \fBThreadLock\fP for 'read' access to the member function\&. " .ti -1c .RI "class \fBost::WriteLock\fP" .br .RI "The \fBWriteLock\fP class is used to protect a section of code through a \fBThreadLock\fP for 'write' access to the member function\&. " .ti -1c .RI "class \fBost::MutexCounter\fP" .br .RI "The \fBMutex\fP \fBCounter\fP is a counter variable which can safely be incremented or decremented by multiple threads\&. " .ti -1c .RI "class \fBost::AtomicCounter\fP" .br .RI "The \fBAtomicCounter\fP class offers thread-safe manipulation of an integer counter\&. " .ti -1c .RI "class \fBost::Conditional\fP" .br .RI "A conditional variable synchcronization object for one to one and one to many signal and control events between processes\&. " .ti -1c .RI "class \fBost::Semaphore\fP" .br .RI "A semaphore is generally used as a synchronization object between multiple threads or to protect a limited and finite resource such as a memory or thread pool\&. " .ti -1c .RI "class \fBost::SemaphoreLock\fP" .br .RI "The \fBSemaphoreLock\fP class is used to protect a section of code through a semaphore so that only x instances of the member function may execute concurrently\&. " .ti -1c .RI "class \fBost::Event\fP" .br .RI "The \fBEvent\fP class implements a feature originally found in the WIN32 API; event notification\&. " .ti -1c .RI "class \fBost::Thread\fP" .br .RI "Every thread of execution in an application is created by instantiating an object of a class derived from the \fBThread\fP class\&. " .ti -1c .RI "class \fBost::Cancellation\fP" .br .RI "A class to automatically set the thread cancellation mode of a member function\&. " .ti -1c .RI "class \fBost::PosixThread\fP" .br .ti -1c .RI "class \fBost::ThreadKey\fP" .br .RI "This class allows the creation of a thread context unique 'pointer' that can be set and retrieved and can be used to create thread specific data areas for implementing 'thread safe' library routines\&. " .ti -1c .RI "class \fBost::TimerPort\fP" .br .RI "Timer ports are used to provide synchronized timing events when managed under a 'service thread' such as \fBSocketService\fP\&. " .ti -1c .RI "class \fBost::SysTime\fP" .br .RI "This class is used to access non-reentrant date and time functions in the standard C library\&. " .in -1c .SS "Namespaces" .in +1c .ti -1c .RI " \fBost\fP" .br .in -1c .SS "Macros" .in +1c .ti -1c .RI "#define \fBCCXX_POSIX\fP" .br .ti -1c .RI "#define \fBTIMEOUT_INF\fP ~((\fBtimeout_t\fP) 0)" .br .ti -1c .RI "#define \fBENTER_CRITICAL\fP enterMutex();" .br .ti -1c .RI "#define \fBLEAVE_CRITICAL\fP leaveMutex();" .br .ti -1c .RI "#define \fBENTER_DEFERRED\fP setCancel(cancelDeferred);" .br .ti -1c .RI "#define \fBLEAVE_DEFERRED\fP setCancel(cancelImmediate);" .br .ti -1c .RI "#define \fBpsleep\fP(x) (sleep)(x)" .br .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef pthread_t \fBcctid_t\fP" .br .ti -1c .RI "typedef unsigned long \fBtimeout_t\fP" .br .ti -1c .RI "typedef int \fBost::signo_t\fP" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "struct timespec * \fBost::getTimeout\fP (struct timespec *spec, \fBtimeout_t\fP timeout)" .br .ti -1c .RI "void \fBost::wait\fP (signo_t signo)" .br .ti -1c .RI "Thread * \fBost::getThread\fP (void)" .br .ti -1c .RI "struct tm * \fBost::localtime_r\fP (const time_t *t, struct tm *b)" .br .ti -1c .RI "char * \fBost::ctime_r\fP (const time_t *t, char *buf)" .br .ti -1c .RI "struct tm * \fBost::gmtime_r\fP (const time_t *t, struct tm *b)" .br .ti -1c .RI "char * \fBost::asctime_r\fP (const struct tm *tm, char *b)" .br .in -1c .SS "Variables" .in +1c .ti -1c .RI "class \fB__EXPORT\fP \fBost::Thread\fP" .br .ti -1c .RI "class \fB__EXPORT\fP \fBost::ThreadKey\fP" .br .ti -1c .RI "class \fB__EXPORT\fP \fBost::Conditional\fP" .br .ti -1c .RI "class \fB__EXPORT\fP \fBost::Event\fP" .br .in -1c .SH "Detailed Description" .PP Synchronization and threading services\&. .SH "Macro Definition Documentation" .PP .SS "#define CCXX_POSIX" .SS "#define ENTER_CRITICAL enterMutex();" .SS "#define ENTER_DEFERRED setCancel(cancelDeferred);" .SS "#define LEAVE_CRITICAL leaveMutex();" .SS "#define LEAVE_DEFERRED setCancel(cancelImmediate);" .SS "#define psleep(x) (sleep)(x)" .SS "#define TIMEOUT_INF ~((\fBtimeout_t\fP) 0)" .SH "Typedef Documentation" .PP .SS "typedef pthread_t \fBcctid_t\fP" .SS "typedef unsigned long \fBtimeout_t\fP" .SH "Author" .PP Generated automatically by Doxygen for GNU CommonC++ from the source code\&.