X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-tls.c;h=35437618413f9f8a17744cbbc68b45e0e50be7b2;hb=d614713a565235b36338496fe3b67a7932a8c78a;hp=125f0e566e9cd98ded090aed6199293040e347a8;hpb=3030c5b5e0a5199e16b05927da72c43c42f211c3;p=gnulib.git diff --git a/tests/test-tls.c b/tests/test-tls.c index 125f0e566..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, 2009 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]);