Lines Matching full:stack

43 	k_thread_stack_t *stack;  in ZTEST_USER()  local
57 stack = k_thread_stack_alloc(CONFIG_DYNAMIC_THREAD_STACK_SIZE, K_USER); in ZTEST_USER()
58 zassert_not_null(stack); in ZTEST_USER()
63 tid = k_thread_create(th, stack, CONFIG_DYNAMIC_THREAD_STACK_SIZE, func, in ZTEST_USER()
71 zassert_ok(k_thread_stack_free(stack)); in ZTEST_USER()
74 /** @brief Exercise the pool-based thread stack allocator */
79 static k_thread_stack_t *stack[CONFIG_DYNAMIC_THREAD_POOL_SIZE]; in ZTEST() local
87 stack[i] = k_thread_stack_alloc(CONFIG_DYNAMIC_THREAD_STACK_SIZE, in ZTEST()
90 zassert_not_null(stack[i]); in ZTEST()
107 tid[i] = k_thread_create(&th[i], stack[i], in ZTEST()
121 zassert_ok(k_thread_stack_free(stack[i])); in ZTEST()
125 /** @brief Exercise the heap-based thread stack allocator */
131 static k_thread_stack_t *stack[MAX_HEAP_STACKS]; in ZTEST() local
143 stack[N] = k_thread_stack_alloc(CONFIG_DYNAMIC_THREAD_STACK_SIZE, in ZTEST()
145 if (stack[N] == NULL) { in ZTEST()
153 tid[i] = k_thread_create(&th[i], stack[i], in ZTEST()
167 zassert_ok(k_thread_stack_free(stack[i])); in ZTEST()
213 /** @brief Exercise stack permissions */
218 static k_thread_stack_t *stack[2]; in ZTEST() local
232 stack[0] = k_thread_stack_alloc(CONFIG_DYNAMIC_THREAD_STACK_SIZE, K_USER); in ZTEST()
233 zassert_not_null(stack[0]); in ZTEST()
235 stack[1] = k_thread_stack_alloc(CONFIG_DYNAMIC_THREAD_STACK_SIZE, K_USER); in ZTEST()
236 zassert_not_null(stack[1]); in ZTEST()
241 tid[0] = k_thread_create(&th[0], stack[0], CONFIG_DYNAMIC_THREAD_STACK_SIZE, perm_func, in ZTEST()
246 tid[1] = k_thread_create(&th[1], stack[1], CONFIG_DYNAMIC_THREAD_STACK_SIZE, in ZTEST()
247 perm_func_violator, &perm_sem, stack[0], NULL, 0, K_USER, in ZTEST()
251 k_thread_access_grant(tid[1], &stack[1]); in ZTEST()
264 zassert_ok(k_thread_stack_free(stack[0])); in ZTEST()
265 zassert_ok(k_thread_stack_free(stack[1])); in ZTEST()