Skip to content

Commit

Permalink
tests: dynamic stack: Fix stack size parameter
Browse files Browse the repository at this point in the history
Fix stack size parameter when creating new threads.

Signed-off-by: Flavio Ceolin <[email protected]>
  • Loading branch information
Flavio Ceolin committed Jun 27, 2023
1 parent 3351f73 commit a1b584d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/kernel/threads/dynamic_thread_stack/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ ZTEST(dynamic_thread_stack, test_dynamic_thread_stack_pool)

/* spawn our threads */
for (size_t i = 0; i < CONFIG_DYNAMIC_THREAD_POOL_SIZE; ++i) {
tid[i] = k_thread_create(&th[i], stack[i], 0, func, &flag[i], NULL, NULL, 0,
K_USER | K_INHERIT_PERMS, K_NO_WAIT);
tid[i] = k_thread_create(&th[i], stack[i],
CONFIG_DYNAMIC_THREAD_STACK_SIZE, func,
&flag[i], NULL, NULL, 0,
K_USER | K_INHERIT_PERMS, K_NO_WAIT);
}

/* join all threads and check that flags have been set */
Expand Down

0 comments on commit a1b584d

Please sign in to comment.