diff options
author | Roland McGrath <roland@hack.frob.com> | 2015-05-19 15:04:41 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2015-05-19 15:04:41 -0700 |
commit | 88ed594f5d431d855256edbe7e886c8cf4b575dc (patch) | |
tree | 32b8ea30f6e6aa95290817dc911978738371c5a2 /sysdeps | |
parent | 654055e09332a0be9a2f0439dbc052e6a82f448a (diff) | |
download | glibc-88ed594f5d431d855256edbe7e886c8cf4b575dc.tar.gz glibc-88ed594f5d431d855256edbe7e886c8cf4b575dc.tar.xz glibc-88ed594f5d431d855256edbe7e886c8cf4b575dc.zip |
BZ#18434: Fix sem_post EOVERFLOW check for [!__HAVE_64B_ATOMICS].
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/sparc/sparc32/sem_post.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/sparc/sparc32/sem_post.c b/sysdeps/sparc/sparc32/sem_post.c index 64cd851ffa..c9f85a06f5 100644 --- a/sysdeps/sparc/sparc32/sem_post.c +++ b/sysdeps/sparc/sparc32/sem_post.c @@ -60,19 +60,19 @@ __new_sem_post (sem_t *sem) int private = isem->private; unsigned int v; - __sparc32_atomic_do_lock24(&isem->pad); + __sparc32_atomic_do_lock24 (&isem->pad); v = isem->value; - if ((v << SEM_VALUE_SHIFT) == SEM_VALUE_MAX) + if ((v >> SEM_VALUE_SHIFT) == SEM_VALUE_MAX) { - __sparc32_atomic_do_unlock24(&isem->pad); + __sparc32_atomic_do_unlock24 (&isem->pad); __set_errno (EOVERFLOW); return -1; } isem->value = v + (1 << SEM_VALUE_SHIFT); - __sparc32_atomic_do_unlock24(&isem->pad); + __sparc32_atomic_do_unlock24 (&isem->pad); if ((v & SEM_NWAITERS_MASK) != 0) futex_wake (&isem->value, 1, private); |