tests: bluetooth: hci_uart_async: Set thread name after creation

When running on native_posix, the thread needs to be created
before the thread name can be set.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This commit is contained in:
Rubin Gerritsen 2024-08-09 10:12:20 +02:00 committed by Anas Nashif
commit d82424ba36

View file

@ -70,10 +70,10 @@ static void hci_uart_thread_entry(void *p1, void *p2, void *p3)
}
static int sys_init_spawn_hci_uart(void)
{
k_thread_name_set(&hci_uart_thread, "hci_uart_main");
k_thread_create(&hci_uart_thread, hci_uart_thread_stack,
K_THREAD_STACK_SIZEOF(hci_uart_thread_stack), hci_uart_thread_entry, NULL,
NULL, NULL, CONFIG_MAIN_THREAD_PRIORITY, 0, K_NO_WAIT);
k_thread_name_set(&hci_uart_thread, "hci_uart_main");
return 0;
}
SYS_INIT(sys_init_spawn_hci_uart, POST_KERNEL, 64);