summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S19
1 files changed, 8 insertions, 11 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
index 9bc12da7e..9755b7e16 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
@@ -17,13 +17,11 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <shlib-compat.h>
#include <pthread-errnos.h>
#include "lowlevel-atomic.h"
#define SYS_gettimeofday __NR_gettimeofday
-#define SYS_futex 240
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
@@ -33,12 +31,9 @@
.type __new_sem_post,@function
.align 5
__new_sem_post:
- mov #1, r3
- XADD (r3, @r4, r2)
+ INC (@r4, r6)
mov #FUTEX_WAKE, r5
- mov r2, r6
- add #1, r6
mov #0, r7
mov #SYS_futex, r3
extu.b r3, r3
@@ -60,7 +55,12 @@ __new_sem_post:
mov.l .Lerrno3, r0
stc gbr, r1
mov.l @(r0, r12), r0
+ bra .Lexit
add r1, r0
+ .align 2
+.Lerrno3:
+ .long errno@GOTTPOFF
+.Lexit:
#else
mov.l .Lerrloc3, r1
bsrf r1
@@ -76,12 +76,9 @@ __new_sem_post:
.align 2
.Lgot3:
.long _GLOBAL_OFFSET_TABLE_
-#if USE___THREAD
-.Lerrno3:
- .long errno@GOTTPOFF
-#else
+#if !USE___THREAD
.Lerrloc3:
.long __errno_location@PLT-(.Lerrloc3b-.)
#endif
.size __new_sem_post,.-__new_sem_post
- versioned_symbol(libpthread, __new_sem_post, sem_post, GLIBC_2_1)
+ weak_alias(__new_sem_post, sem_post)