This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix tst-rwlock14 on !i386 !x86_64


Hi!

2004-06-28  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/pthread/pthread_rwlock_timedwrlock.c
	(pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
	instead of tv_sec.
	* sysdeps/pthread/pthread_rwlock_timedrdlock.c
	(pthread_rwlock_timedrdlock): Likewise.

--- libc/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c.jj	2004-06-28 21:06:11.000000000 +0200
+++ libc/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c	2004-06-28 21:10:04.127935596 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -62,7 +62,7 @@ pthread_rwlock_timedwrlock (rwlock, abst
 	 to the front is no option.  Replicating all the code is
 	 costly while this test is not.  */
       if (__builtin_expect (abstime->tv_nsec >= 1000000000
-                            || abstime->tv_sec < 0, 0))
+                            || abstime->tv_nsec < 0, 0))
 	{
 	  result = EINVAL;
 	  break;
--- libc/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c.jj	2004-06-28 21:07:17.000000000 +0200
+++ libc/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c	2004-06-28 21:10:09.526980957 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -71,7 +71,7 @@ pthread_rwlock_timedrdlock (rwlock, abst
 	 to the front is no option.  Replicating all the code is
 	 costly while this test is not.  */
       if (__builtin_expect (abstime->tv_nsec >= 1000000000
-                            || abstime->tv_sec < 0, 0))
+                            || abstime->tv_nsec < 0, 0))
 	{
 	  result = EINVAL;
 	  break;

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]