Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

thread.h File Reference

Synchronization and threading services. More...

#include <cc++/config.h>
#include <cc++/exception.h>
#include <pthread.h>
#include <semaphore.h>
#include <time.h>
#include <signal.h>
#include <unistd.h>

Go to the source code of this file.

Compounds

class  AtomicCounter
 The AtomicCounter class offers thread-safe manipulation of an integer counter. atomic counter operation. More...

class  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. Producer/Consumer buffer for use between threads. More...

class  Conditional
 A conditional variable synchcronization object for one to one and one to many signal and control events between processes. conditional. More...

class  Event
 The Event class implements a feature originally found in the WIN32 API; event notification. Thread synchornization on event notification. More...

class  FixedBuffer
 A buffer class that holds a known capacity of fixed sized objects defined during creation. producer/consumer buffer for fixed size objects. More...

class  Mutex
 The Mutex class is used to protect a section of code so that at any given time only a single thread can perform the protected operation. Mutex lock for protected access. More...

class  MutexCounter
 The Mutex Counter is a counter variable which can safely be incremented or decremented by multiple threads. Thread protected integer counter. More...

class  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. Mutex automatic locker for protected access. More...

class  PosixThread
class  Semaphore
 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. Semaphore counter for thread synchronization. More...

class  Thread
 Every thread of execution in an application is created by instantiating an object of a class derived from the Thread class. base class used to derive all threads of execution. More...

class  ThreadKey
 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. container for thread specific data storage. More...

class  ThreadLock
 The ThreadLock 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. Posix rwlock extension for protected access. More...

class  TimerPort
 Timer ports are used to provide synchronized timing events when managed under a "service thread" such as SocketService. synchronized millisecond timing for service threads. More...


Defines

#define CCXX_POSIX
#define TIMEOUT_INF   ~((timeout_t) 0)
#define ENTER_CRITICAL   enterMutex();
#define LEAVE_CRITICAL   leaveMutex();
#define ENTER_DEFERRED   setCancel(cancelDeferred);
#define LEAVE_DEFERRED   setCancel(cancelImmediate);
#define psleep(x)   (sleep)(x)

Typedefs

typedef pthread_t cctid_t
typedef unsigned long timeout_t

Functions

timespec * getTimeout (struct timespec *spec, timeout_t timeout)
void wait (signo_t signo)

Variables

CCXX_CLASS_EXPORT Thread
CCXX_CLASS_EXPORT ThreadKey
CCXX_CLASS_EXPORT Event
CCXX_EXPORT(void) setException(Thread typedef in signo_t )


Detailed Description

Synchronization and threading services.


Define Documentation

#define CCXX_POSIX
 

#define ENTER_CRITICAL   enterMutex();
 

#define ENTER_DEFERRED   setCancel(cancelDeferred);
 

#define LEAVE_CRITICAL   leaveMutex();
 

#define LEAVE_DEFERRED   setCancel(cancelImmediate);
 

#define psleep  )     (sleep)(x)
 

#define TIMEOUT_INF   ~((timeout_t) 0)
 


Typedef Documentation

typedef pthread_t cctid_t
 

typedef unsigned long timeout_t
 


Function Documentation

struct timespec* getTimeout struct timespec *  spec,
timeout_t  timeout
 

void wait signo_t  signo  ) 
 


Variable Documentation

class CCXX_CLASS_EXPORT Event
 

CCXX_EXPORT (void) setException(Thread typedef in signo_t)
 

class CCXX_CLASS_EXPORT Thread
 

class CCXX_CLASS_EXPORT ThreadKey
 


Generated on Thu Sep 25 13:14:32 2003 for GNU CommonC++ by doxygen 1.3.3