[SH] nptl/tst-abstime: pthread_mutex_timedlock
Thomas Schwinge
thomas@codesourcery.com
Mon Feb 6 14:37:00 GMT 2012
Hi!
Resending with copyright year update.
On Mon, 06 Feb 2012 12:18:31 +0100, I wrote:
> SH needs the analog of what has been changed in commit
> 2983d85ee5492c4ab1f09ca554e47192fa5c97a2, originally submitted in
> <http://sourceware.org/ml/libc-hacker/2010-07/msg00000.html>, but not
> fixed for SH at that time. No other architecture is affected, as (apart
> From x86 and x86_64) SH is the only one to use thusly optimized code
> governed by __ASSUME_FUTEX_CLOCK_REALTIME, and only uses it in this very
> place. (So, now every usage in glibc and glibc-ports should be correct.)
nptl/
2012-01-24 Thomas Schwinge <thomas@codesourcery.com>
* sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
Check for timestamp before the Epoch.
Index: nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
===================================================================
--- nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S (revision 355696)
+++ nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S (working copy)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010
+/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -244,6 +244,12 @@ __lll_timedlock_wait:
bt .Lreltmo
# endif
+ /* if (timeout->tv_sec < 0) return ETIMEDOUT; */
+ mov.l @r6, r1
+ cmp/pz r1
+ bf/s 5f
+ mov #ETIMEDOUT, r0
+
mov r4, r2
mov r5, r4
mov r7, r5
@@ -279,6 +285,7 @@ __lll_timedlock_wait:
neg r0, r3
3:
mov r3, r0
+5:
rts
mov.l @r15+, r12
Grüße,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120206/429e5d4d/attachment.sig>
More information about the Libc-alpha
mailing list