54 virtual void Wait() = 0;
78 void operator=(
const PSync &) { }
152 class PInstrumentedWaitAndSignal
159 __inline
explicit PInstrumentedWaitAndSignal(
162 ) : m_location(location)
163 , sync(const_cast<PSync &>(sem))
168 __inline PInstrumentedWaitAndSignal(
172 ) : m_location(location)
173 , sync(const_cast<
PSync &>(sem))
183 __inline ~PInstrumentedWaitAndSignal()
185 sync.InstrumentedSignal(m_location);
193 #define P_INSTRUMENTED_WAIT_AND_SIGNAL2(var, mutex) PInstrumentedWaitAndSignal var(P_DEBUG_LOCATION, mutex)
195 #define P_INSTRUMENTED_WAIT_AND_SIGNAL2(var, mutex) PWaitAndSignal var(mutex)
197 #define P_INSTRUMENTED_WAIT_AND_SIGNAL(mutex) P_INSTRUMENTED_WAIT_AND_SIGNAL2(lock##__LINE__,mutex)
200 #endif // PTLIB_SYNC_H
virtual PBoolean Wait(const PTimeInterval &)
Block, for a time, until the synchronisation object is available.
Definition: psync.h:88
Information about a source file location.
Definition: object.h:333
#define PMaxTimeInterval
Definition: timeint.h:31
PSyncNULL()
Definition: psync.h:86
This class waits for the semaphore on construction and automatically signals the semaphore on destruc...
Definition: psync.h:115
virtual void Wait()=0
Block until the synchronisation object is available.
This class defines an arbitrary time interval to millisecond accuracy.
Definition: timeint.h:51
virtual void Wait()
Block until the synchronisation object is available.
Definition: psync.h:87
virtual void Signal()
Signal that the synchronisation object is available.
Definition: psync.h:89
PSync()
Definition: psync.h:48
Synchronisation without really synchronising.
Definition: psync.h:83
__inline PWaitAndSignal(const PSync &sem, bool wait)
Definition: psync.h:129
bool PBoolean
Definition: object.h:174
virtual void Signal()=0
Signal that the synchronisation object is available.
__inline ~PWaitAndSignal()
Signal the semaphore.
Definition: psync.h:142
__inline PWaitAndSignal(const PSync &sem)
Create the semaphore wait instance.
Definition: psync.h:122
virtual bool InstrumentedWait(const PTimeInterval &timeout, const PDebugLocation &)
As for Wait() but with location of call for instrumentation. Mostly used internally.
Definition: psync.h:66
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
virtual void InstrumentedSignal(const PDebugLocation &)
As for Signal() but with location of call for instrumentation. Mostly used internally.
Definition: psync.h:73
PSync & sync
Definition: psync.h:148