Commit d3747db6 authored by Enjia Mai's avatar Enjia Mai Committed by Anas Nashif
Browse files

tests: kernel: fix two test cases of condvar hang up in SMP


Make some change on two codvar test cases to fit testing under SMP,
and shorter the test cases execution time.

Fixes #33558.
Signed-off-by: default avatarEnjia Mai <enjiax.mai@intel.com>
parent 2e1ac6b4
......@@ -511,7 +511,7 @@ void inc_count(void *p1, void *p2, void *p3)
k_mutex_unlock(&test_mutex);
/* Sleep so threads can alternate on mutex lock */
k_sleep(K_MSEC(200));
k_sleep(K_MSEC(50));
}
}
......@@ -536,6 +536,9 @@ void _condvar_usecase(long multi)
count = 0;
/* Reinit mutex to prevent affection from previous testcases */
k_mutex_init(&test_mutex);
k_thread_create(&multiple_tid[0], multiple_stack[0], STACK_SIZE, watch_count,
INT_TO_POINTER(t1), NULL, NULL, K_PRIO_PREEMPT(10),
K_USER | K_INHERIT_PERMS, K_NO_WAIT);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment