X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-tls.c;h=35437618413f9f8a17744cbbc68b45e0e50be7b2;hb=092a81622804491f13fb73f4df610db0db45b35a;hp=9cdfe1de3bb8704ec697e7b8d2c830a803a49f44;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=gnulib.git diff --git a/tests/test-tls.c b/tests/test-tls.c index 9cdfe1de3..354376184 100644 --- a/tests/test-tls.c +++ b/tests/test-tls.c @@ -1,5 +1,5 @@ /* Test of thread-local storage in multithreaded situations. - Copyright (C) 2005, 2008 Free Software Foundation, Inc. + Copyright (C) 2005, 2008-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -94,7 +94,7 @@ worker_thread (void *arg) /* Initialize the per-thread storage. */ for (i = 0; i < KEYS_COUNT; i++) { - values[i] = (((unsigned int) rand() >> 3) % 1000000) * THREAD_COUNT + id; + values[i] = (((unsigned int) rand () >> 3) % 1000000) * THREAD_COUNT + id; /* Hopefully no arithmetic overflow. */ if ((values[i] % THREAD_COUNT) != id) abort (); @@ -124,8 +124,8 @@ worker_thread (void *arg) for (repeat = REPEAT_COUNT; repeat > 0; repeat--) { dbgprintf ("Worker %p doing value swapping\n", gl_thread_self ()); - i = ((unsigned int) rand() >> 3) % KEYS_COUNT; - j = ((unsigned int) rand() >> 3) % KEYS_COUNT; + i = ((unsigned int) rand () >> 3) % KEYS_COUNT; + j = ((unsigned int) rand () >> 3) % KEYS_COUNT; if (i != j) { void *vi = gl_tls_get (mykeys[i]);