about summary refs log tree commit diff
path: root/nptl/sem_post.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-11-23 10:38:12 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-11-25 10:43:18 -0300
commitb45b1c5ba1df4d0315ffdd00a040ff9bc0597a8d (patch)
tree635d26de59ee085627b6b36ee4116c27f74563c6 /nptl/sem_post.c
parent2a45be88ed4753a9756d840b3182a87f2ae1200b (diff)
downloadglibc-b45b1c5ba1df4d0315ffdd00a040ff9bc0597a8d.tar.gz
glibc-b45b1c5ba1df4d0315ffdd00a040ff9bc0597a8d.tar.xz
glibc-b45b1c5ba1df4d0315ffdd00a040ff9bc0597a8d.zip
nptl: Replace lll_futex_wake with futex-internal.h
The idea is to make NPTL implementation to use on the functions
provided by futex-internal.h.

Checked on x86_64-linux-gnu and i686-linux-gnu.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'nptl/sem_post.c')
-rw-r--r--nptl/sem_post.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/nptl/sem_post.c b/nptl/sem_post.c
index 88cfc24b30..5dbfb3a214 100644
--- a/nptl/sem_post.c
+++ b/nptl/sem_post.c
@@ -84,19 +84,14 @@ int
 attribute_compat_text_section
 __old_sem_post (sem_t *sem)
 {
-  int *futex = (int *) sem;
+  unsigned int *futex = (unsigned int *) sem;
 
   /* We must need to synchronize with consumers of this token, so the atomic
      increment must have release MO semantics.  */
   atomic_write_barrier ();
   (void) atomic_increment_val (futex);
   /* We always have to assume it is a shared semaphore.  */
-  int err = lll_futex_wake (futex, 1, LLL_SHARED);
-  if (__builtin_expect (err, 0) < 0)
-    {
-      __set_errno (-err);
-      return -1;
-    }
+  futex_wake (futex, 1, LLL_SHARED);
   return 0;
 }
 compat_symbol (libpthread, __old_sem_post, sem_post, GLIBC_2_0);