X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fapi.h;h=dced0d8d204e15b84252f1f374f7b5027d12490b;hb=8bad63a0394e7f76f344e065cc90327c099eae8e;hp=2b876565c991351a86f3c61748addc1d20b1a68a;hpb=108a92e5b97ee91b2b902dba2dd2e78aab42f420;p=urcu.git 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",