Check reader/write thread state

Add bThreadRunning flag to thread data, stop the thread only when
it's running.

Remove bEnable flag which was used to block io operations while
callback is processed, but they can be serialized by rxSemaphore
and txSemaphore without bEnable flag.

1. Reader: do not use bThreadBusy for reader thread. Reader thread
is always busy. rxSemaphore is released after read callback
is processed.

2. Writer: txSemaphore will be released on phTmlUwb_Write(), when
it's !bThreadBusy - Caller should call phTmlUwb_Write() only
when there are no other write request is being processed.

Bug: 336425207
Bug: 321157817
Test: multi session stress test
Change-Id: I264dad538fb9d95fd47ba15ed8e7119ea3525115
2 files changed
tree: 87ebd3897a8da67204cc3edd33936d242209a3ec
  1. aidl/
  2. extns/
  3. halimpl/
  4. Android.bp