aboutsummaryrefslogtreecommitdiff
path: root/nptl/tst-rwlock9.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/tst-rwlock9.c')
-rw-r--r--nptl/tst-rwlock9.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/nptl/tst-rwlock9.c b/nptl/tst-rwlock9.c
index adbf67224d..a5522ce484 100644
--- a/nptl/tst-rwlock9.c
+++ b/nptl/tst-rwlock9.c
@@ -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);