]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 27 Feb 2003 19:49:35 +0000 (19:49 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 27 Feb 2003 19:49:35 +0000 (19:49 +0000)
* tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
(reader_thread): Likewise.

nptl/ChangeLog
nptl/tst-rwlock9.c

index e81af68ce147f3232ed708e803be1a10ae56faae..c1f0a2b9eac7e6d874ac988e0e60a16d4b69bffc 100644 (file)
@@ -1,5 +1,8 @@
 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
 
+       * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
+       (reader_thread): Likewise.
+
        * sysdeps/pthread/pthread_rwlock_unlock.c
        (__pthread_rwlock_unlock): Release internal lock early.  Don't try
        to wake up readers if there are none.
index adbf67224d9e2f036274f515ade795ab9c36121e..a5522ce48410d4b9c43f2ce768cd3475d7296057 100644 (file)
@@ -62,6 +62,11 @@ writer_thread (void *nr)
          TIMEVAL_TO_TIMESPEC (&tv, &ts);
 
          ts.tv_nsec += 2 * TIMEOUT;
+         if (ts.tv_nsec >= 1000000000)
+           {
+             ts.tv_nsec -= 1000000000;
+             ++ts.tv_sec;
+           }
 
          printf ("writer thread %ld tries again\n", (long int) nr);
 
@@ -111,6 +116,11 @@ reader_thread (void *nr)
          TIMEVAL_TO_TIMESPEC (&tv, &ts);
 
          ts.tv_nsec += TIMEOUT;
+         if (ts.tv_nsec >= 1000000000)
+           {
+             ts.tv_nsec -= 1000000000;
+             ++ts.tv_sec;
+           }
 
          printf ("reader thread %ld tries again\n", (long int) nr);
 
This page took 0.053253 seconds and 5 git commands to generate.