mirror of git://sourceware.org/git/glibc.git
(sem_timedwait): Set ETIMEDOUT to errno when time is up. Tweak to avoid assembler warning.
This commit is contained in:
parent
bcbfaf1def
commit
980c14c526
|
|
@ -42,8 +42,10 @@ sem_timedwait:
|
||||||
mov #0xf9, r1
|
mov #0xf9, r1
|
||||||
and r1, r0
|
and r1, r0
|
||||||
cmp/eq #8, r0
|
cmp/eq #8, r0
|
||||||
bt 10f
|
bf 0f
|
||||||
|
bra 10f
|
||||||
|
stc gbr, r0
|
||||||
|
0:
|
||||||
mov.l @r4, r0
|
mov.l @r4, r0
|
||||||
2:
|
2:
|
||||||
tst r0, r0
|
tst r0, r0
|
||||||
|
|
@ -115,7 +117,8 @@ sem_timedwait:
|
||||||
add #-1, r2
|
add #-1, r2
|
||||||
5:
|
5:
|
||||||
cmp/pz r2
|
cmp/pz r2
|
||||||
bf 6f /* Time is already up. */
|
bf/s 6f /* Time is already up. */
|
||||||
|
mov #ETIMEDOUT, r0
|
||||||
|
|
||||||
/* Store relative timeout. */
|
/* Store relative timeout. */
|
||||||
mov.l r2, @r15
|
mov.l r2, @r15
|
||||||
|
|
@ -196,7 +199,6 @@ sem_timedwait:
|
||||||
|
|
||||||
10:
|
10:
|
||||||
/* Canceled. */
|
/* Canceled. */
|
||||||
stc gbr, r0
|
|
||||||
mov.w .Lresult, r1
|
mov.w .Lresult, r1
|
||||||
mov #-1, r2
|
mov #-1, r2
|
||||||
mov.l r2, @(r0,r1)
|
mov.l r2, @(r0,r1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue