summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2007-11-13 04:05:31 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2007-11-13 04:05:31 +0000
commit5efcf07228a4532074784c85689dddcbb6b56c77 (patch)
tree5991b8c3ee489b7c34221390007e3bd67a689d41 /libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
parent18b48698abe6cf957ec6ee5fa921b1a12f9bf914 (diff)
downloaduClibc-alpine-5efcf07228a4532074784c85689dddcbb6b56c77.tar.bz2
uClibc-alpine-5efcf07228a4532074784c85689dddcbb6b56c77.tar.xz
Begin merging of SuperH NPTL port. See the mailing list for further information.
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S17
1 files changed, 8 insertions, 9 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
index acb7d0f78..c8bd4af0f 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
@@ -17,14 +17,12 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <shlib-compat.h>
#include <pthread-errnos.h>
#include <tcb-offsets.h>
#include "lowlevel-atomic.h"
#define SYS_gettimeofday __NR_gettimeofday
-#define SYS_futex 240
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
@@ -118,7 +116,7 @@ sem_timedwait:
5:
cmp/pz r2
bf/s 6f /* Time is already up. */
- mov #ETIMEDOUT, r0
+ mov #ETIMEDOUT, r0
/* Store relative timeout. */
mov.l r2, @r15
@@ -179,15 +177,19 @@ sem_timedwait:
mov.l .Lerrno2, r0
stc gbr, r1
mov.l @(r0, r12), r0
+ bra .Lexit
add r1, r0
- mov.l r8, @r0
+ .align 2
+.Lerrno2:
+ .long errno@GOTTPOFF
+.Lexit:
#else
mov.l .Lerrloc2, r1
bsrf r1
nop
.Lerrloc2b:
- mov.l r8, @r0
#endif
+ mov.l r8, @r0
add #8, r15
lds.l @r15+, pr
mov.l @r15+, r12
@@ -225,10 +227,7 @@ sem_timedwait:
.long 1000000000
.Lgot2:
.long _GLOBAL_OFFSET_TABLE_
-#if USE___THREAD
-.Lerrno2:
- .long errno@GOTTPOFF
-#else
+#if !USE___THREAD
.Lerrloc2:
.long __errno_location@PLT-(.Lerrloc2b-.)
#endif