The test assumes that cpu_id ranges from 0 to n CPU - 1 which is not necessary true on all archs. Meanwhile thread ids are always ranging from 0 to N (0 here is for the main test thread)
Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]> --- test/validation/odp_synchronizers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/validation/odp_synchronizers.c b/test/validation/odp_synchronizers.c index a9be1c5..5123177 100644 --- a/test/validation/odp_synchronizers.c +++ b/test/validation/odp_synchronizers.c @@ -165,7 +165,7 @@ static uint32_t barrier_test(per_thread_mem_t *per_thread_mem, uint32_t thread_num, slow_thread_num, next_slow_thread, num_threads; uint32_t lock_owner_delay, barrier_cnt1, barrier_cnt2; - thread_num = odp_cpu_id() + 1; + thread_num = odp_thread_id(); global_mem = per_thread_mem->global_mem; num_threads = global_mem->g_num_threads; iterations = BARRIER_ITERATIONS; _______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
