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

Wefts Namespace Reference

The Wefts++ namespace. More...


Compounds

class  Barrier
 Programmable fence object. More...

class  CleanupHandler
 Cleanup handler interface. More...

class  Condition
 Class implementing a condition variable. More...

class  Counter
 Syncrhonizable counter. More...

class  Error
 Generic error class This is meant to be overloaded by specific error classe below. More...

class  FastCondition
 Fast mutex + condition structure wrapper. More...

class  InitError
 Error risen when there is an object can't be initialized. More...

class  InvalidError
 Error risen if an object is in an invalid state while being used. More...

class  MoaningThread
 A thread subclass supporting an arbitrary number of joiners. More...

class  Mutex
 Implements a very fast, non reentrant mutex. More...

class  NotJoinableError
 Error risen when the thread tries to join a detached thread. More...

class  OSConditionBase
 This class implement an os-dependant condition. More...

class  OSConditionPthread
 This class implement an os-dependant condition. More...

class  OSMutexBase
 Implements an OS specific mutex This mutex class is not supposed to be reentrant, but it is supposed to have an trylock() feature at OS level. More...

class  OSMutexPthread
class  OSSpecificDataBase
 Wrapper class for thread specific data access (tsd/tls). More...

class  OSSpecificDataPthread
 Wrapper class for pthread specific data access (tsd/tls). More...

class  OSThreadBase
 Thread OS layer abstraction This class can be rewritten in other header files to implement different os specific threading system. More...

class  OSThreadPthread
 Wraps Posix threads. More...

class  RCondition
 Reentrant mutex + condition structure wrapper. More...

class  Referenced
 Shared object between threads implementing reference count and self-cancelation. More...

class  RingBuffer
 Ring buffer synchronization object. More...

class  RMutex
 This is a reentrant mutex with spinlock. More...

class  RRWMutex
 This is an advanced (and fully reentrant) read/write mutex. More...

class  RWMutex
 This is a read/write mutex. More...

class  StartError
 Error risen when is not possible to start other threads anymore. More...

class  Subscription
 Subscribe/notify model abstraction. More...

class  Thread
 Implements the abstraction of a thread. More...

class  ThreadPtr
 Implements a very fast thread specific data. More...

class  XMutex
 Advanced mutex class. More...


Typedefs

typedef std::pair< CleanupHandler *,
int > 
CleanupItem
typedef std::stack< CleanupItemCleanupList
typedef OSSpecificDataPthread OSSpecificData
typedef OSThreadPthread OSThread
typedef OSConditionPthread OSCondition
typedef OSMutexPthread OSMutex

Functions

void OSPushCleanupAndExecute (void(*runner)(void *), void(*cleaner)(void *), void *data)
 Function to execute the thread RUN procedure guarded by OS cleanup.

std::string OSErrorDescription (int osCode)
 Function to report OS specific error.

void wefts_pthread_cond_guard (void *param)
 This function is used internally by pthread module to safely guard the condition on async cancelation.

void wefts_pthread_cond_reset (void *param)
bool Sleep (long seconds, long nanoseconds)
 Sleeps a certain amount of time.

bool Sleep (double seconds)
 Sleeps a certain amount of time.

std::ostream & operator<< (std::ostream &stream, Error &err)
void s_ThreadCleanupper (void *param)
 Function used (internally) to invoke thread->cleanup() in case of cancelation.

void s_ThreadRunner (void *data)
void * s_ThreadRunFunc (void *param)
 Function used (internally) to invoke thread->run().

Counter runningThreads (1)
 Counter of currently active (or near-to-be active) threads.

Counter startedThreads (1)
 Incremental counter of started threads.


Variables

Counter runningThreads
 Counter of currently active (or near-to-be active) threads.

Counter startedThreads
 Incremental counter of started threads.


Detailed Description

The Wefts++ namespace.

All the wefts classes and functions are available under Wefts namespace; they are rather thread specific, so if you are using Wefts++ alone, without any other threading library, you will be pretty safe in adding:

   #include <wefts.h>

   using namespace Wefts;

Otherwise, you will have to prefix all Wefts++ calls with the namespace:

   #include <wefts.h>

   int main( int argc, char *argv[] )
   {
      //sleeping a while..
      Wefts::Sleep( 1.5 );
   }


Typedef Documentation

typedef std::pair<CleanupHandler *, int > Wefts::CleanupItem
 

typedef std::stack< CleanupItem > Wefts::CleanupList
 


Function Documentation

std::ostream& operator<< std::ostream &    stream,
Error   err
 

Use this operator to display what kind of error has happened

Counter runningThreads  
 

Counter of currently active (or near-to-be active) threads.

Initialized to 1: if we initialized it, the main thread is running...

void s_ThreadCleanupper void *    param
 

Function used (internally) to invoke thread->cleanup() in case of cancelation.

void* s_ThreadRunFunc void *    param
 

Function used (internally) to invoke thread->run().

void s_ThreadRunner void *    data
 

Counter startedThreads  
 

Incremental counter of started threads.

It is used just in internal thread ID count for debugging or reporting purposes


Generated on Mon Aug 18 05:53:44 2003 for Wefts by doxygen1.2.18