bluetooth: hci: h4: Add thread name
Add a name to the h4 rx thread. It's useful to put a name on each thread for debugging, e.g., with the shell's kernel threads command. Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
This commit is contained in:
parent
acd0555f50
commit
ecfda097d1
1 changed files with 7 additions and 5 deletions
|
@ -475,6 +475,7 @@ int __weak bt_hci_transport_setup(const struct device *dev)
|
||||||
static int h4_open(void)
|
static int h4_open(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
k_tid_t tid;
|
||||||
|
|
||||||
BT_DBG("");
|
BT_DBG("");
|
||||||
|
|
||||||
|
@ -488,11 +489,12 @@ static int h4_open(void)
|
||||||
|
|
||||||
uart_irq_callback_set(h4_dev, bt_uart_isr);
|
uart_irq_callback_set(h4_dev, bt_uart_isr);
|
||||||
|
|
||||||
k_thread_create(&rx_thread_data, rx_thread_stack,
|
tid = k_thread_create(&rx_thread_data, rx_thread_stack,
|
||||||
K_KERNEL_STACK_SIZEOF(rx_thread_stack),
|
K_KERNEL_STACK_SIZEOF(rx_thread_stack),
|
||||||
rx_thread, NULL, NULL, NULL,
|
rx_thread, NULL, NULL, NULL,
|
||||||
K_PRIO_COOP(CONFIG_BT_RX_PRIO),
|
K_PRIO_COOP(CONFIG_BT_RX_PRIO),
|
||||||
0, K_NO_WAIT);
|
0, K_NO_WAIT);
|
||||||
|
k_thread_name_set(tid, "bt_rx_thread");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue