From b4b4d161c2fba54de7f4b297af66a2a807d62f98 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 17 Jul 2024 14:59:55 +1000 Subject: [PATCH] unix/mpbtstackport_usb: Remove thread detached attribute. As in the previous commit, the thread is later joined so can't be detached. Signed-off-by: Damien George --- ports/unix/mpbtstackport_usb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ports/unix/mpbtstackport_usb.c b/ports/unix/mpbtstackport_usb.c index 8b1d1fff2..a924fc3ca 100644 --- a/ports/unix/mpbtstackport_usb.c +++ b/ports/unix/mpbtstackport_usb.c @@ -110,10 +110,7 @@ static void *btstack_thread(void *arg) { void mp_bluetooth_btstack_port_start(void) { // Create a thread to run the btstack loop. - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - pthread_create(&bstack_thread_id, &attr, &btstack_thread, NULL); + pthread_create(&bstack_thread_id, NULL, &btstack_thread, NULL); } #endif // MICROPY_PY_BLUETOOTH && MICROPY_BLUETOOTH_BTSTACK && MICROPY_BLUETOOTH_BTSTACK_USB