man thread.h (Fonctions bibliothèques) - Synchronization and threading services.

NAME

thread.h - Synchronization and threading services.

SYNOPSIS



#include <cc++/config.h>

#include <ctime>

#include <pthread.h>

#include <time.h>

#include <signal.h>

#include <unistd.h>

Namespaces

namespace ost

Classes

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

The ReadLock class is used to protect a section of code through a ThreadLock for 'read' access to the member function.Read mode automatic locker for protected access. class ost::WriteLock

The WriteLock class is used to protect a section of code through a ThreadLock for 'write' access to the member function.Read mode automatic locker for protected access. class ost::MutexCounter

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

The AtomicCounter class offers thread-safe manipulation of an integer counter.atomic counter operation. class ost::Conditional

A conditional variable synchcronization object for one to one and one to many signal and control events between processes.conditional. class ost::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. 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.Semaphore automatic locker for protected access. class ost::Event

The Event class implements a feature originally found in the WIN32 API; event notification.Thread synchornization on event notification. class ost::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. class ost::Cancellation

A class to automatically set the thread cancellation mode of a member function.Automatic cancellation mode setting. class ost::PosixThread

class ost::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. class ost::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. class ost::SysTime

This class is used to access non-reentrant date and time functions in the standard C library.Thread safe date and time functions.

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

typedef int ost::signo_t

Functions

timespec * ost::getTimeout (struct timespec *spec, timeout_t timeout)

void ost::wait (signo_t signo)

Thread * ost::getThread (void)

tm * ost::localtime_r (const time_t *t, struct tm *b)

char * ost::ctime_r (const time_t *t, char *buf)

tm * ost::gmtime_r (const time_t *t, struct tm *b)\

char * ost::asctime_r (const struct tm *tm, char *b)\

Variables

__EXPORT ost::Thread

__EXPORT ost::ThreadKey

__EXPORT ost::Conditional

__EXPORT ost::Event

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(x) (sleep)(x)

#define TIMEOUT_INF ~((timeout_t) 0)

Typedef Documentation

typedef pthread_t cctid_t

typedef unsigned long timeout_t

Author

Generated automatically by Doxygen for GNU CommonC++ from the source code.