From 8e352780fd0e2fbc8f4c4971aae188d62df24d0a Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 9 Jan 2014 19:14:09 +0100 Subject: tests: Call srand for each thread under Windows. * tests/t-lock.c (accountant_thread) [W32]: Call srand. --- tests/t-lock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/t-lock.c b/tests/t-lock.c index 91923fb..190d63e 100644 --- a/tests/t-lock.c +++ b/tests/t-lock.c @@ -164,6 +164,9 @@ accountant_thread (void *arg) (void)arg; +#ifdef _WIN32 + srand (time(NULL)*getpid()); /* Windows needs it per thread. */ +#endif for (i = 0; i < N_TRANSACTIONS; i++) { rc = gpgrt_lock_lock (&accounts_lock); -- cgit v1.2.3