PTLib  Version 2.18.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
syncthrd.h File Reference
#include <ptlib/mutex.h>
#include <ptlib/semaphor.h>
#include <ptlib/syncpoint.h>
#include <map>
#include <queue>
Include dependency graph for syncthrd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PSyncPointAck
 This class defines a thread synchronisation object. More...
 
class  PCondMutex
 This class defines a thread synchronisation object. More...
 
class  PIntCondMutex
 This is a PCondMutex for which the conditional is the value of an integer. More...
 
class  PReadWriteMutex
 This class defines a thread synchronisation object. More...
 
struct  PReadWriteMutex::Nest
 
class  PReadWriteWaitAndSignalBase
 
class  PReadWaitAndSignal
 This class starts a read operation for the PReadWriteMutex on construction and automatically ends the read operation on destruction. More...
 
class  PWriteWaitAndSignal
 This class starts a write operation for the PReadWriteMutex on construction and automatically ends the write operation on destruction. More...
 
class  PSyncQueue< T >
 A synchronous queue of objects. More...
 

Macros

#define PDECLARE_READ_WRITE_MUTEX_ARG_1(var)   struct PReadWriteMutex_##var : PReadWriteMutex { PReadWriteMutex_##var() : PReadWriteMutex(P_DEBUG_LOCATION) { } } var
 Declare a PReadWriteMutex with compiled file/line for deadlock debugging. More...
 
#define PDECLARE_READ_WRITE_MUTEX_ARG_2(var, nam)   struct PReadWriteMutex_##var : PReadWriteMutex { PReadWriteMutex_##var() : PReadWriteMutex(#nam, ) { } } var
 
#define PDECLARE_READ_WRITE_MUTEX_ARG_3(var, nam, to)   struct PReadWriteMutex_##var : PReadWriteMutex { PReadWriteMutex_##var() : PReadWriteMutex(#nam,to ) { } } var
 
#define PDECLARE_READ_WRITE_MUTEX_ARG_4(var, nam, to, tw)   struct PReadWriteMutex_##var : PReadWriteMutex { PReadWriteMutex_##var() : PReadWriteMutex(#nam,to,tw ) { } } var
 
#define PDECLARE_READ_WRITE_MUTEX_ARG_5(var, nam, to, tw, th)   struct PReadWriteMutex_##var : PReadWriteMutex { PReadWriteMutex_##var() : PReadWriteMutex(#nam,to,tw,th ) { } } var
 
#define PDECLARE_READ_WRITE_MUTEX_PART1(narg, args)   PDECLARE_READ_WRITE_MUTEX_PART2(narg, args)
 
#define PDECLARE_READ_WRITE_MUTEX_PART2(narg, args)   PDECLARE_READ_WRITE_MUTEX_ARG_##narg args
 
#define PDECLARE_READ_WRITE_MUTEX(...)   PDECLARE_READ_WRITE_MUTEX_PART1(PARG_COUNT(__VA_ARGS__), (__VA_ARGS__))
 
#define PDECLARE_INSTRUMENTED_READ_WRITE_MUTEX(var, name, waitTime, heldTime,...)   PDECLARE_READ_WRITE_MUTEX(var, name, MinDeadlockTime(waitTime))
 

Macro Definition Documentation

#define PDECLARE_INSTRUMENTED_READ_WRITE_MUTEX (   var,
  name,
  waitTime,
  heldTime,
  ... 
)    PDECLARE_READ_WRITE_MUTEX(var, name, MinDeadlockTime(waitTime))
#define PDECLARE_READ_WRITE_MUTEX (   ...)    PDECLARE_READ_WRITE_MUTEX_PART1(PARG_COUNT(__VA_ARGS__), (__VA_ARGS__))
#define PDECLARE_READ_WRITE_MUTEX_ARG_1 (   var)    struct PReadWriteMutex_##var : PReadWriteMutex { PReadWriteMutex_##var() : PReadWriteMutex(P_DEBUG_LOCATION) { } } var

Declare a PReadWriteMutex with compiled file/line for deadlock debugging.

#define PDECLARE_READ_WRITE_MUTEX_ARG_2 (   var,
  nam 
)    struct PReadWriteMutex_##var : PReadWriteMutex { PReadWriteMutex_##var() : PReadWriteMutex(#nam, ) { } } var
#define PDECLARE_READ_WRITE_MUTEX_ARG_3 (   var,
  nam,
  to 
)    struct PReadWriteMutex_##var : PReadWriteMutex { PReadWriteMutex_##var() : PReadWriteMutex(#nam,to ) { } } var
#define PDECLARE_READ_WRITE_MUTEX_ARG_4 (   var,
  nam,
  to,
  tw 
)    struct PReadWriteMutex_##var : PReadWriteMutex { PReadWriteMutex_##var() : PReadWriteMutex(#nam,to,tw ) { } } var
#define PDECLARE_READ_WRITE_MUTEX_ARG_5 (   var,
  nam,
  to,
  tw,
  th 
)    struct PReadWriteMutex_##var : PReadWriteMutex { PReadWriteMutex_##var() : PReadWriteMutex(#nam,to,tw,th ) { } } var
#define PDECLARE_READ_WRITE_MUTEX_PART1 (   narg,
  args 
)    PDECLARE_READ_WRITE_MUTEX_PART2(narg, args)
#define PDECLARE_READ_WRITE_MUTEX_PART2 (   narg,
  args 
)    PDECLARE_READ_WRITE_MUTEX_ARG_##narg args