ostest/spinlock: Check the return value.

This commit added checking for the return value.

Signed-off-by: anpeiyun <anpeiyun@xiaomi.com>
This commit is contained in:
anpeiyun 2025-10-26 11:29:33 +08:00 committed by Xiang Xiao
parent f86246f7c6
commit 52c2a8909b

View file

@ -149,7 +149,11 @@ static inline void run_test_thread(
{
param[i].pub = &pub;
param[i].delta = 0;
pthread_create(&tid[i], NULL, thread_func, &param[i]);
ret = pthread_create(&tid[i], NULL, thread_func, &param[i]);
if (ret != 0)
{
ASSERT(false);
}
}
ret = pthread_barrier_wait(&pub.barrier);