Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

thread.h File Reference

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 sychcronization 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  Poller
 The poller class is used to help manage pollfd structs for use in the updated serial and socket "port" code. pollfd assistance class for port classes. More...

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 deriving a unique class from the Thread class and by implementing the Run method. 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...


Typedefs

typedef pthread_t cctid_t
typedef unsigned long timeout_t
typedef int signo_t

Enumerations

enum  throw_t { THROW_NOTHING, THROW_OBJECT, THROW_EXCEPTION }
enum  thread_cancel_t {
  THREAD_CANCEL_INITIAL = 0, THREAD_CANCEL_DEFERRED = 1, THREAD_CANCEL_IMMEDIATE, THREAD_CANCEL_DISABLED,
  THREAD_CANCEL_DEFAULT = THREAD_CANCEL_DEFERRED, THREAD_CANCEL_INVALID
}
enum  thread_suspend_t { THREAD_SUSPEND_ENABLE, THREAD_SUSPEND_DISABLE }

Functions

ThreadgetThread (void)
void execHandler (Thread *th)
void sigHandler (int signo)
void* getKey (ThreadKey &tk)
void setKey (ThreadKey &tk, void *ptr)
void operator++ (Mutex &m)
void operator-- (Mutex &m)
void operator++ (Semaphore &s)
void operator-- (Semaphore &s)
void operator++ (Event &s)
void operator-- (Event &s)
void signal (Thread &th, int signo)
void signal (Event &ev)
void signal (Semaphore &sem)
void wait (Semaphore &sem)
void wait (Event &ev, timeout_t timer)
void reset (Event &ev)
int get (Buffer &b, void *o)
int put (Buffer &b, void *o)
int peek (Buffer &b, void *o)
int operator++ (MutexCounter &mc)
int operator-- (MutexCounter &mc)
struct timespec* gettimeout (struct timespec *spec, timeout_t timeout)
void ccxx_sleep (timeout_t msec)
void ccxx_yield (void)
void wait (signo_t signo)
void pdetach (void)
 This function provides a simple and portable means to fork/detach a process into a daemon. This function provides a simple and portable means to fork/detach a process into a daemon. More...


Typedef Documentation

typedef pthread_t cctid_t
 

typedef int signo_t
 

typedef unsigned long timeout_t
 


Enumeration Type Documentation

enum thread_cancel_t
 

Enumeration values:
THREAD_CANCEL_INITIAL  
THREAD_CANCEL_DEFERRED  
THREAD_CANCEL_IMMEDIATE  
THREAD_CANCEL_DISABLED  
THREAD_CANCEL_DEFAULT  
THREAD_CANCEL_INVALID  

enum thread_suspend_t
 

Enumeration values:
THREAD_SUSPEND_ENABLE  
THREAD_SUSPEND_DISABLE  

enum throw_t
 

Enumeration values:
THROW_NOTHING  
THROW_OBJECT  
THROW_EXCEPTION  


Function Documentation

void ccxx_sleep ( timeout_t msec )
 

This is mapped into sleep().

Parameters:
msec   timeout in millisecond time range.

void ccxx_yield ( void )
 

void execHandler ( Thread * th )
 

int get ( Buffer & b,
void * o ) [inline]
 

void * getKey ( ThreadKey & tk ) [inline]
 

Thread* getThread ( void )
 

struct timespec* gettimeout ( struct timespec * spec,
timeout_t timeout )
 

int operator++ ( MutexCounter & mc )
 

void operator++ ( Event & s ) [inline]
 

void operator++ ( Semaphore & s ) [inline]
 

void operator++ ( Mutex & m ) [inline]
 

int operator-- ( MutexCounter & mc )
 

void operator-- ( Event & s ) [inline]
 

void operator-- ( Semaphore & s ) [inline]
 

void operator-- ( Mutex & m ) [inline]
 

void pdetach ( void )
 

This function provides a simple and portable means to fork/detach a process into a daemon. This function provides a simple and portable means to fork/detach a process into a daemon.

Author(s):
David Sugar <dyfet@ostel.com>

int peek ( Buffer & b,
void * o ) [inline]
 

int put ( Buffer & b,
void * o ) [inline]
 

void reset ( Event & ev ) [inline]
 

void setKey ( ThreadKey & tk,
void * ptr ) [inline]
 

void sigHandler ( int signo )
 

void signal ( Semaphore & sem ) [inline]
 

void signal ( Event & ev ) [inline]
 

void signal ( Thread & th,
int signo ) [inline]
 

void wait ( signo_t signo )
 

void wait ( Event & ev,
timeout_t timer ) [inline]
 

void wait ( Semaphore & sem ) [inline]
 


Generated at Thu Oct 4 15:32:59 2001 for CommonC++ by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001