Cleanup: remove trailing whitespaces at EOL
[urcu.git] / urcu / uatomic / s390.h
index b274c1cb372d22be165aa6dd01bf5da08430d21b..62561e000224ccb4c71e244a239eab5ac730f70b 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifdef __cplusplus
 extern "C" {
-#endif 
+#endif
 
 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
 #define COMPILER_HAVE_SHORT_MEM_OPERAND
@@ -106,8 +106,9 @@ unsigned long _uatomic_exchange(volatile void *addr, unsigned long val, int len)
 }
 
 #define uatomic_xchg(addr, v)                                              \
-       (__typeof__(*(addr))) _uatomic_exchange((addr), (unsigned long)(v), \
-                                              sizeof(*(addr)))
+       (__typeof__(*(addr))) _uatomic_exchange((addr),                     \
+                                               caa_cast_long_keep_sign(v), \
+                                               sizeof(*(addr)))
 
 /* cmpxchg */
 
@@ -145,13 +146,13 @@ unsigned long _uatomic_cmpxchg(void *addr, unsigned long old,
        return 0;
 }
 
-#define uatomic_cmpxchg(addr, old, _new)                               \
-       (__typeof__(*(addr))) _uatomic_cmpxchg((addr),                  \
-                                              (unsigned long)(old),    \
-                                              (unsigned long)(_new),   \
+#define uatomic_cmpxchg(addr, old, _new)                                    \
+       (__typeof__(*(addr))) _uatomic_cmpxchg((addr),                       \
+                                              caa_cast_long_keep_sign(old), \
+                                              caa_cast_long_keep_sign(_new),\
                                               sizeof(*(addr)))
 
-#ifdef __cplusplus 
+#ifdef __cplusplus
 }
 #endif
 
This page took 0.023562 seconds and 4 git commands to generate.