This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/4, libitm]: Change gtm_futex_{wait,wake} to int


2015-05-27  Uros Bizjak  <ubizjak@gmail.com>

    * config/linux/futex.cc (gtm_futex_wait, gtm_futex_wake):
    Declare as static int.
    (FUTEX_PRIVATE_FLAG): Remove L suffix.
    * config/linux/futex_bits.h (sys_futex0) Change operand "op" to int.

Tested on x86_64-linux-gnu {,-m32}.

OK for mainline?

Uros.

Index: config/linux/futex.cc
===================================================================
--- config/linux/futex.cc       (revision 223771)
+++ config/linux/futex.cc       (working copy)
@@ -33,11 +33,11 @@

 #define FUTEX_WAIT             0
 #define FUTEX_WAKE             1
-#define FUTEX_PRIVATE_FLAG     128L
+#define FUTEX_PRIVATE_FLAG     128


-static long int gtm_futex_wait = FUTEX_WAIT | FUTEX_PRIVATE_FLAG;
-static long int gtm_futex_wake = FUTEX_WAKE | FUTEX_PRIVATE_FLAG;
+static int gtm_futex_wait = FUTEX_WAIT | FUTEX_PRIVATE_FLAG;
+static int gtm_futex_wake = FUTEX_WAKE | FUTEX_PRIVATE_FLAG;


 void
Index: config/linux/futex_bits.h
===================================================================
--- config/linux/futex_bits.h   (revision 223771)
+++ config/linux/futex_bits.h   (working copy)
@@ -34,7 +34,7 @@
 #include <errno.h>

 static inline long
-sys_futex0 (std::atomic<int> *addr, long op, long val)
+sys_futex0 (std::atomic<int> *addr, int op, int val)
 {
   long res = syscall (SYS_futex, (int*) addr, op, val, 0);
   if (__builtin_expect (res == -1, 0))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]