Package: qt4-x11 / 4:4.8.7+dfsg-18

add_missing_method_for_QBasicAtomicPointer_on_s390.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: add missing method for QBasicAtomicPointer on s390(x)
Author: Dan HorĂ¡k <dan[at]dannu.cz>

---
 src/corelib/arch/qatomic_s390.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- a/src/corelib/arch/qatomic_s390.h
+++ b/src/corelib/arch/qatomic_s390.h
@@ -400,6 +400,16 @@ Q_INLINE_TEMPLATE T* QBasicAtomicPointer
 
 
 template <typename T>
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd)
+{
+#ifndef __s390x__
+    return (T *)__CS_OLD_LOOP(&_q_value, valueToAdd * sizeof(T), "ar", "", "bcr 15,0\n");
+#else
+    return (T *)__CSG_OLD_LOOP(&_q_value, valueToAdd * sizeof(T), "agr", "", "bcr 15,0\n");
+#endif
+}
+
+template <typename T>
 Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
 {
     return fetchAndAddOrdered(valueToAdd);