testsuite: ztress: Delay start of the test
Delay start of threads and timer to ensure that setup is completed. Especially, vital on multiple CPUs. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
1916a833f3
commit
fe423d52a7
1 changed files with 3 additions and 2 deletions
|
@ -353,16 +353,17 @@ int ztress_execute(struct ztress_context_data *timer_data,
|
|||
tids[i] = k_thread_create(&threads[i], stacks[i], CONFIG_ZTRESS_STACK_SIZE,
|
||||
ztress_thread,
|
||||
&thread_data[i], (void *)(uintptr_t)ztress_prio, NULL,
|
||||
priority, 0, K_NO_WAIT);
|
||||
priority, 0, K_MSEC(10));
|
||||
(void)k_thread_name_set(tids[i], thread_names[i]);
|
||||
priority++;
|
||||
ztress_prio++;
|
||||
}
|
||||
|
||||
if (timer_data != NULL) {
|
||||
k_timer_start(&ztress_timer, backoff[0], K_NO_WAIT);
|
||||
k_timer_start(&ztress_timer, K_MSEC(10), K_NO_WAIT);
|
||||
}
|
||||
|
||||
|
||||
/* Wait until all threads complete. */
|
||||
for (int i = 0; i < cnt; i++) {
|
||||
k_thread_join(tids[i], K_FOREVER);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue