42 #include <QtCore/qglobal.h> 43 #include <QtCore/qhash.h> 49 #define UNLOCKED {-1,-1,-1,-1} 50 #define UNLOCKED2 UNLOCKED,UNLOCKED 51 #define UNLOCKED4 UNLOCKED2,UNLOCKED2 52 #define UNLOCKED8 UNLOCKED4,UNLOCKED4 53 #define UNLOCKED16 UNLOCKED8,UNLOCKED8 54 #define UNLOCKED32 UNLOCKED16,UNLOCKED16 55 #define UNLOCKED64 UNLOCKED32,UNLOCKED32 56 #define UNLOCKED128 UNLOCKED64,UNLOCKED64 57 #define UNLOCKED256 UNLOCKED128,UNLOCKED128 63 {
return locks[
qHash(const_cast<void *>(addr)) % 256]; }
68 return off ? (
int *)(
ulong(lock) + 16 - off) : lock;
73 int q_ldcw(
volatile int *addr);
78 volatile int *x =
align16(lock);
84 { lock[0] = lock[1] = lock[2] = lock[3] = -1; }
#define QT_END_NAMESPACE
This macro expands to.
int * getLock(volatile void *addr)
static int * align16(int *lock)
#define QT_BEGIN_NAMESPACE
This macro expands to.
void q_atomic_lock(int *lock)
uint qHash(const QUrl &url)
static QReadWriteLock lock
#define QT_USE_NAMESPACE
This macro expands to using QT_NAMESPACE if QT_NAMESPACE is defined and nothing otherwise.
void q_atomic_unlock(int *lock)
int q_ldcw(volatile int *addr)