about summary refs log tree commit diff
path: root/nptl/sem_post.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-01-23 14:48:40 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-01-23 14:48:40 -0800
commit22971c35e2de34ec3e1b02e9bceebcba2ead7bfe (patch)
tree64179073200de33895177a542748e069a9fb096a /nptl/sem_post.c
parent2ec2d7032ff9220da1577c37d41ae85c0721ad66 (diff)
downloadglibc-22971c35e2de34ec3e1b02e9bceebcba2ead7bfe.tar.gz
glibc-22971c35e2de34ec3e1b02e9bceebcba2ead7bfe.tar.xz
glibc-22971c35e2de34ec3e1b02e9bceebcba2ead7bfe.zip
Use uint64_t and (uint64_t) 1 for 64-bit int
This patch replaces unsigned long int and 1UL with uint64_t and
(uint64_t) 1 to support ILP32 targets like x32.

	[BZ #17870]
	* nptl/sem_post.c (__new_sem_post): Replace unsigned long int
	with uint64_t.
	* nptl/sem_waitcommon.c (__sem_wait_cleanup): Replace 1UL with
	(uint64_t) 1.
	(__new_sem_wait_slow): Replace unsigned long int with uint64_t.
	Replace 1UL with (uint64_t) 1.
	* sysdeps/nptl/internaltypes.h (new_sem): Replace unsigned long
	int with uint64_t.
Diffstat (limited to 'nptl/sem_post.c')
-rw-r--r--nptl/sem_post.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nptl/sem_post.c b/nptl/sem_post.c
index 9162e4c8a6..6e495ed810 100644
--- a/nptl/sem_post.c
+++ b/nptl/sem_post.c
@@ -65,7 +65,7 @@ __new_sem_post (sem_t *sem)
      added tokens before (the release sequence includes atomic RMW operations
      by other threads).  */
   /* TODO Use atomic_fetch_add to make it scale better than a CAS loop?  */
-  unsigned long int d = atomic_load_relaxed (&isem->data);
+  uint64_t d = atomic_load_relaxed (&isem->data);
   do
     {
       if ((d & SEM_VALUE_MASK) == SEM_VALUE_MAX)