#include "qplatformdefs.h"
#include <QtCore/qatomic.h>
Go to the source code of this file.
|
static pthread_mutex_t | qAtomicMutex = PTHREAD_MUTEX_INITIALIZER |
|
◆ QBasicAtomicInt_fetchAndAddOrdered()
Q_CORE_EXPORT int QBasicAtomicInt_fetchAndAddOrdered |
( |
volatile int * |
_q_value, |
|
|
int |
valueToAdd |
|
) |
| |
Definition at line 76 of file qatomic_generic_unix.cpp.
80 returnValue = *_q_value;
81 *_q_value += valueToAdd;
static pthread_mutex_t qAtomicMutex
◆ QBasicAtomicInt_fetchAndStoreOrdered()
Q_CORE_EXPORT int QBasicAtomicInt_fetchAndStoreOrdered |
( |
volatile int * |
_q_value, |
|
|
int |
newValue |
|
) |
| |
◆ QBasicAtomicInt_testAndSetOrdered()
Q_CORE_EXPORT bool QBasicAtomicInt_testAndSetOrdered |
( |
volatile int * |
_q_value, |
|
|
int |
expectedValue, |
|
|
int |
newValue |
|
) |
| |
Definition at line 52 of file qatomic_generic_unix.cpp.
54 bool returnValue =
false;
56 if (*_q_value == expectedValue) {
static pthread_mutex_t qAtomicMutex
◆ QBasicAtomicPointer_fetchAndAddOrdered()
Q_CORE_EXPORT void* QBasicAtomicPointer_fetchAndAddOrdered |
( |
void *volatile * |
_q_value, |
|
|
qptrdiff |
valueToAdd |
|
) |
| |
Definition at line 113 of file qatomic_generic_unix.cpp.
117 returnValue = *_q_value;
118 *_q_value =
reinterpret_cast<char *
>(returnValue) + valueToAdd;
static pthread_mutex_t qAtomicMutex
◆ QBasicAtomicPointer_fetchAndStoreOrdered()
Q_CORE_EXPORT void* QBasicAtomicPointer_fetchAndStoreOrdered |
( |
void *volatile * |
_q_value, |
|
|
void * |
newValue |
|
) |
| |
Definition at line 102 of file qatomic_generic_unix.cpp.
106 returnValue = *_q_value;
107 *_q_value = newValue;
static pthread_mutex_t qAtomicMutex
◆ QBasicAtomicPointer_testAndSetOrdered()
Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetOrdered |
( |
void *volatile * |
_q_value, |
|
|
void * |
expectedValue, |
|
|
void * |
newValue |
|
) |
| |
Definition at line 87 of file qatomic_generic_unix.cpp.
91 bool returnValue =
false;
93 if (*_q_value == expectedValue) {
static pthread_mutex_t qAtomicMutex
◆ qAtomicMutex
pthread_mutex_t qAtomicMutex = PTHREAD_MUTEX_INITIALIZER |
|
static |