QtCore/qatomic_sh.h File Reference

qatomic_sh.h File Reference

Macros

#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE
 
#define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE
 
#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_NOT_NATIVE
 
#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_NOT_NATIVE
 
#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE
 
#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_NOT_NATIVE
 
#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE
 

Functions

Q_CORE_EXPORT void qt_atomic_yield (int *count)
 
int qt_atomic_tasb (volatile char *ptr)
 

Variables

Q_CORE_EXPORT volatile char qt_atomic_lock
 

Macro Definition Documentation

#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE

Definition at line 49 of file qatomic_sh.h.

#define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE

Definition at line 56 of file qatomic_sh.h.

#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_NOT_NATIVE

Definition at line 63 of file qatomic_sh.h.

#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_NOT_NATIVE

Definition at line 70 of file qatomic_sh.h.

#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE

Definition at line 77 of file qatomic_sh.h.

#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_NOT_NATIVE

Definition at line 86 of file qatomic_sh.h.

#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE

Definition at line 95 of file qatomic_sh.h.

Function Documentation

Q_CORE_EXPORT void qt_atomic_yield ( int count)
int qt_atomic_tasb ( volatile char *  ptr)
inline

Definition at line 107 of file qatomic_sh.h.

108 {
109  register int ret;
110  asm volatile("tas.b @%2\n"
111  "movt %0"
112  : "=&r"(ret), "=m"(*ptr)
113  : "r"(ptr)
114  : "cc", "memory");
115  return ret;
116 }

Variable Documentation

Q_CORE_EXPORT volatile char qt_atomic_lock

Go to the source code of this file.