1 /*
2 * Copyright (c) 2024 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include <zephyr/kernel.h>
8
9 #define EXTRA_THREAD_STACKSIZE 2048
10
11 struct k_thread extra_thread;
12 K_THREAD_STACK_DEFINE(extra_stack, EXTRA_THREAD_STACKSIZE);
13
thread_entry(void * p1,void * p2,void * p3)14 static void thread_entry(void *p1, void *p2, void *p3)
15 {
16 /* This thread does not have a name so thread analyzer will display
17 * the memory address of the thread struct, which is needed for
18 * the twister console harness to match (even if CONFIG_THREAD_NAME=y).
19 */
20 while (true) {
21 k_sleep(K_SECONDS(300));
22 }
23 }
24
main(void)25 int main(void)
26 {
27 k_thread_create(&extra_thread, extra_stack, EXTRA_THREAD_STACKSIZE,
28 thread_entry, NULL, NULL, NULL, K_PRIO_PREEMPT(0),
29 IS_ENABLED(CONFIG_USERSPACE) ? K_USER : 0,
30 K_MSEC(0));
31 return 0;
32 }
33