aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-29 21:10:51 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-29 21:10:51 +0000
commit980c14c526348b7b24ca74c6a94a396d5f0ab942 (patch)
treef1b2331ca930dca39d889fe4da35ec9127d2d71a /nptl
parentbcbfaf1def57a02b15709e476bd069bdf4ba2619 (diff)
downloadglibc-980c14c526348b7b24ca74c6a94a396d5f0ab942.zip
glibc-980c14c526348b7b24ca74c6a94a396d5f0ab942.tar.gz
glibc-980c14c526348b7b24ca74c6a94a396d5f0ab942.tar.bz2
(sem_timedwait): Set ETIMEDOUT to errno when time is up. Tweak to avoid assembler warning.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S10
1 files changed, 6 insertions, 4 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
index 27a1bb0..acb7d0f 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
@@ -42,8 +42,10 @@ sem_timedwait:
mov #0xf9, r1
and r1, r0
cmp/eq #8, r0
- bt 10f
-
+ bf 0f
+ bra 10f
+ stc gbr, r0
+0:
mov.l @r4, r0
2:
tst r0, r0
@@ -115,7 +117,8 @@ sem_timedwait:
add #-1, r2
5:
cmp/pz r2
- bf 6f /* Time is already up. */
+ bf/s 6f /* Time is already up. */
+ mov #ETIMEDOUT, r0
/* Store relative timeout. */
mov.l r2, @r15
@@ -196,7 +199,6 @@ sem_timedwait:
10:
/* Canceled. */
- stc gbr, r0
mov.w .Lresult, r1
mov #-1, r2
mov.l r2, @(r0,r1)