X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Fapi.h;h=dced0d8d204e15b84252f1f374f7b5027d12490b;hp=2b876565c991351a86f3c61748addc1d20b1a68a;hb=a5bae03d59c22e57263b8610b9fed99738303cf0;hpb=108a92e5b97ee91b2b902dba2dd2e78aab42f420 diff --git a/tests/api.h b/tests/api.h index 2b87656..dced0d8 100644 --- a/tests/api.h +++ b/tests/api.h @@ -151,9 +151,10 @@ static int __smp_thread_id(void) } spin_lock(&__thread_id_map_mutex); for (i = 0; i < NR_THREADS; i++) { - if (__thread_id_map[i] == tid) + if (__thread_id_map[i] == tid) { spin_unlock(&__thread_id_map_mutex); return i; + } } spin_unlock(&__thread_id_map_mutex); fprintf(stderr, "smp_thread_id: Rogue thread, id: %lu(%#lx)\n",