[SH] nptl/tst-sem13: sem_timedwait

Thomas Schwinge thomas@codesourcery.com
Mon Feb 6 14:37:00 GMT 2012


Hi!

SH needs the analog of 9554ebf2d4da22591e974d3cf2ed09a2b8dbdbd8 plus the
fix to it that I just posted, as well as the testcase update.

nptl/
2012-01-24  Thomas Schwinge  <thomas@codesourcery.com>

	* sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
	updating nwaiters.

Index: nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
===================================================================
--- nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S	(revision 355696)
+++ nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S	(working copy)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2007, 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -70,8 +70,8 @@ sem_timedwait:
 	mov.l	@(4,r9), r0
 	mov.l	.L1g, r1
 	cmp/hs	r1, r0
-	bt/s	6f
-	 mov	#EINVAL, r0
+	bt/s	.Lerrno_exit
+	 mov	#EINVAL, r10
 	INC (@(NWAITERS,r8),r2)
 
 7:
@@ -169,6 +169,8 @@ sem_timedwait:
 	neg	r0, r0
 6:
 	mov	r0, r10
+	DEC (@(NWAITERS,r8), r2)
+.Lerrno_exit:
 	mova	.Lgot2, r0
 	mov.l	.Lgot2, r12
 	add	r0, r12
@@ -190,7 +192,6 @@ sem_timedwait:
 .Lerrloc2b:
 #endif
 	mov.l	r10, @r0
-	DEC (@(NWAITERS,r8), r2)
 	bra	10b
 	 mov	#-1, r0
 


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/d1fa1b35/attachment.sig>


More information about the Libc-alpha mailing list