UCommon
Data Structures | Macros | Functions
thread.h File Reference

Common C++ thread class and sychronization objects. More...

#include <commoncpp/config.h>
#include <commoncpp/string.h>
#include <time.h>
Include dependency graph for thread.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  ost::Buffer
 The buffer class represents an IPC service that is built upon a buffer of fixed capacity that can be used to transfer objects between one or more producer and consumer threads. More...
 
class  ost::FixedBuffer
 A buffer class that holds a known capacity of fixed sized objects defined during creation. More...
 
class  ost::MutexCounter
 The Mutex Counter is a counter variable which can safely be incremented or decremented by multiple threads. More...
 
class  ost::MutexLock
 The MutexLock class is used to protect a section of code so that at any given time only a single thread can perform the protected operation. More...
 
class  ost::ReadLock
 The ReadLock class is used to protect a section of code through a ThreadLock for "read" access to the member function. More...
 
class  ost::SemaphoreLock
 The SemaphoreLock class is used to protect a section of code through a semaphore so that only x instances of the member function may execute concurrently. More...
 
class  ost::SysTime
 This class is used to access non-reentrant date and time functions in the standard C library. More...
 
class  ost::ThreadQueue
 Somewhat generic queue processing class to establish a producer consumer queue. More...
 
class  ost::TimerPort
 Timer ports are used to provide synchronized timing events when managed under a "service thread" such as SocketService. More...
 
class  ost::WriteLock
 The WriteLock class is used to protect a section of code through a ThreadLock for "write" access to the member function. More...
 

Macros

#define ENTER_CRITICAL   enterMutex();
 
#define LEAVE_CRITICAL   leaveMutex();
 

Functions

char * ost::asctime_r (const struct tm *tm, char *b)
 
char * ost::ctime_r (const time_t *t, char *buf)
 
Thread * ost::getThread (void)
 
struct timespec * ost::getTimeout (struct timespec *spec, timeout_t timeout)
 
struct tm * ost::gmtime_r (const time_t *t, struct tm *b)
 
struct tm * ost::localtime_r (const time_t *t, struct tm *b)
 

Detailed Description

Common C++ thread class and sychronization objects.

Definition in file thread.h.