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 classes 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 | OSConditionWindows |
This class implement an os-dependant condition. More... | |
class | OSFileFuncBase |
Abstracts an OS specific file fucntion set. More... | |
class | OSFileFuncUnix |
class | OSFileFuncWin |
Implements COFFEE file specific extensions for MS-Windows. 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 | OSMutexWindows |
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 | OSSpecificDataWindows |
Wrapper class for thread 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 | OSThreadWindows |
Wraps Windows threads. More... | |
class | Queue |
Waitable template FIFO structure. 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 | Stack |
Waitable template LIFO structure. 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< CleanupItem > | CleanupList |
typedef long long | file_size_t |
The longest integer available on the platform. | |
typedef OSFileFuncUnix | OSFileFunc |
Definition that hooks COFFEE for Windows in your application. | |
typedef OSSpecificDataPthread | OSSpecificData |
Function to execute the thread RUN procedure guarded by OS cleanup. | |
typedef OSThreadPthread | OSThread |
typedef OSConditionPthread | OSCondition |
typedef OSMutexPthread | OSMutex |
Enumerations | |
enum | LockMode { LM_SHARED, LM_SHARED_RO, LM_EXCLUSIVE } |
Basic locking schemes used by various systems at open time. More... | |
enum | OpenMode { OM_RO, OM_WO, OM_RW, OM_TRUNC_WO, OM_TRUNC_RW, OM_APPEND_WO, OM_APPEND_RW } |
Basic open modes used by various systems. More... | |
enum | CreateMode { CM_ARCHIVE, CM_SYSTEM, CM_EXECUTABLE, CM_PRIVATE, CM_PRIVATE_EX } |
Creation modes. More... | |
enum | CffStatus { CFF_DONE, CFF_WAITING, CFF_TIMEDOUT, CFF_SOFTERROR, CFF_HARDERROR, CFF_PROGERROR } |
Cooperative File Functions Status Cooperative file functions retunrs this os-independent high level status code to inform the caller about the status of the operation, and give the caller the ability to take corrective actions indipendently from operating system error codes. More... | |
enum | SeekWhence { SW_FROM_BEGIN = 0, SW_FROM_CUR = 1, SW_FROM_CURENT = 1, SW_FROM_END = 2 } |
Position indicators for file seeks. More... | |
Functions | |
std::string | OSErrorDescription (int osCode) |
Function to report OS specific error. | |
bool | OSSleep (long nSeconds, long nNanoseconds) |
Function to provide a wefts-interruptable wait. | |
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. | |
VOID CALLBACK | s_opCompleted (DWORD dwErrorCode, DWORD dwCount, LPOVERLAPPED lpOverlapped) |
DWORD WINAPI | s_asyncRead (LPVOID Cargo) |
DWORD WINAPI | s_asyncWrite (LPVOID Cargo) |
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 | |
DWORD | s_tlsThreadObj = TLS_OUT_OF_INDEXES |
void(* | s_cleanerPointer )(void *) |
Counter | runningThreads |
Counter of currently active (or near-to-be active) threads. | |
Counter | startedThreads |
Incremental counter of started threads. |
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 ); }
|
|
|
|
|
Use this operator to display what kind of error has happened |
|
Counter of currently active (or near-to-be active) threads. Initialized to 1: if we initialized it, the main thread is running... |
|
|
|
|
|
|
|
Function used (internally) to invoke thread->cleanup() in case of cancelation.
|
|
Function used (internally) to invoke thread->run().
|
|
|
|
Incremental counter of started threads. It is used just in internal thread ID count for debugging or reporting purposes |
|
|
|
|