diff options
author | Werner Koch <[email protected]> | 2014-01-09 18:14:09 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-01-24 20:53:34 +0000 |
commit | 8e352780fd0e2fbc8f4c4971aae188d62df24d0a (patch) | |
tree | a934405f6bf0033b18adfe4c2d152adb5b4189e3 | |
parent | Do not use the threadlib macros for Windows. (diff) | |
download | libgpg-error-8e352780fd0e2fbc8f4c4971aae188d62df24d0a.tar.gz libgpg-error-8e352780fd0e2fbc8f4c4971aae188d62df24d0a.zip |
tests: Call srand for each thread under Windows.
* tests/t-lock.c (accountant_thread) [W32]: Call srand.
-rw-r--r-- | tests/t-lock.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |