Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 791d9aa8 authored by Himanshu Rawat's avatar Himanshu Rawat
Browse files

Don't treat pthread_t as a signed value type

1. HID host treats pthread_t as a signed value. Some platform may define
it as unsigned type.
2. HID host uses -1 as invalid pthread ID. pthread does not define
invalid thread ID.


Bug: 285750089
Test: Floss test "Two BLE connections"
Change-Id: I77eb1596910ee1a6c9c2244beff7ff382ca57ba0
parent c82004bf
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -493,11 +493,11 @@ void bta_hh_co_close(btif_hh_device_t* p_dev) {
#endif  // ENABLE_UHID_SET_REPORT

  /* Stop the polling thread */
  if (p_dev->hh_keep_polling) {
    p_dev->hh_keep_polling = 0;
  if (p_dev->hh_poll_thread_id > 0) {
    pthread_join(p_dev->hh_poll_thread_id, NULL);
  }
    p_dev->hh_poll_thread_id = -1;
  }
  /* UHID file descriptor is closed by the polling thread */
}