diff options
| author | Damien George <damien@micropython.org> | 2024-07-17 14:59:55 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2024-07-17 15:02:57 +1000 |
| commit | b4b4d161c2fba54de7f4b297af66a2a807d62f98 (patch) | |
| tree | 1601a3d7074f42a27129166e5d1c0756afb26fbd | |
| parent | 220088fff679aa00feaaa1a842bdb1dddc10ff26 (diff) | |
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 <damien@micropython.org>
| -rw-r--r-- | ports/unix/mpbtstackport_usb.c | 5 |
1 files changed, 1 insertions, 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 |
