Qt 4.8
Public Functions | Properties | List of all members
Rendezvous Class Reference

Public Functions

void checkpoint ()
 

Properties

QSemaphore semaphore
 
QAtomicInt state
 

Detailed Description

Definition at line 63 of file qeventdispatcher_qpa.cpp.

Functions

◆ checkpoint()

void Rendezvous::checkpoint ( )
inline

Definition at line 66 of file qeventdispatcher_qpa.cpp.

67  {
68  if (state.testAndSetOrdered(0,1)) {
70  } else if (state.testAndSetAcquire(1,0)) {
72  } else {
73  qWarning("Barrier internal error");
74  }
75  }
bool testAndSetAcquire(int expectedValue, int newValue)
Atomic test-and-set.
void release(int n=1)
Releases n resources guarded by the semaphore.
Definition: qsemaphore.cpp:161
Q_CORE_EXPORT void qWarning(const char *,...)
void acquire(int n=1)
Tries to acquire n resources guarded by the semaphore.
Definition: qsemaphore.cpp:142
bool testAndSetOrdered(int expectedValue, int newValue)
Atomic test-and-set.
QSemaphore semaphore

Properties

◆ semaphore

QSemaphore Rendezvous::semaphore
private

Definition at line 77 of file qeventdispatcher_qpa.cpp.

Referenced by checkpoint().

◆ state

QAtomicInt Rendezvous::state
private

Definition at line 78 of file qeventdispatcher_qpa.cpp.

Referenced by checkpoint().


The documentation for this class was generated from the following file: