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]

Re: [PATCH 1/3, libgomp]: Change gomp_futex_{wait,wake} to int


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

    * config/linux/wait.h (gomp_futex_wait, gomp_futex_wake):
    Declare as int.
    (FUTEX_PRIVATE_FLAG): Remove L suffix.
    * config/linux/mutex.c (gomp_futex_wait, gomp_futex_wake):
    Declare as int.

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

OK for mainline?

Uros.

Index: config/linux/mutex.c
===================================================================
--- config/linux/mutex.c        (revision 223771)
+++ config/linux/mutex.c        (working copy)
@@ -29,8 +29,8 @@

 #include "wait.h"

-long int gomp_futex_wake = FUTEX_WAKE | FUTEX_PRIVATE_FLAG;
-long int gomp_futex_wait = FUTEX_WAIT | FUTEX_PRIVATE_FLAG;
+int gomp_futex_wake = FUTEX_WAKE | FUTEX_PRIVATE_FLAG;
+int gomp_futex_wait = FUTEX_WAIT | FUTEX_PRIVATE_FLAG;

 void
 gomp_mutex_lock_slow (gomp_mutex_t *mutex, int oldval)
Index: config/linux/wait.h
===================================================================
--- config/linux/wait.h (revision 223771)
+++ config/linux/wait.h (working copy)
@@ -35,13 +35,13 @@

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

 #ifdef HAVE_ATTRIBUTE_VISIBILITY
 # pragma GCC visibility push(hidden)
 #endif

-extern long int gomp_futex_wait, gomp_futex_wake;
+extern int gomp_futex_wait, gomp_futex_wake;

 #include <futex.h>


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