]> Savannah Git Hosting - gnulib.git/commitdiff
tss tests: Small improvement.
authorBruno Haible <bruno@clisp.org>
Thu, 20 Jun 2019 15:44:59 +0000 (17:44 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 20 Jun 2019 15:44:59 +0000 (17:44 +0200)
* tests/test-tss.c (test_tss): Pass a different id to each thread.

ChangeLog
tests/test-tss.c

index 08076909d4c0c9b56074b1f1dd41e10829e21b02..9c9a0122fd4448a2845842feddb96d903830fe4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-06-20  Bruno Haible  <bruno@clisp.org>
+
+       tss tests: Small improvement.
+       * tests/test-tss.c (test_tss): Pass a different id to each thread.
+
 2019-06-20  Bruno Haible  <bruno@clisp.org>
 
        threads: New module.
index b23767d218b50a46e0c3812c298ed419ea5980f3..081e1b0359b3d9b30f288c4609baa2594557e0e0 100644 (file)
@@ -170,7 +170,8 @@ test_tss (void)
 
       /* Spawn the threads.  */
       for (i = 0; i < THREAD_COUNT; i++)
-        ASSERT (thrd_create (&threads[i], worker_thread, NULL) == thrd_success);
+        ASSERT (thrd_create (&threads[i], worker_thread, (void *) (uintptr_t) i)
+                == thrd_success);
 
       /* Wait for the threads to terminate.  */
       for (i = 0; i < THREAD_COUNT; i++)