diff options
author | Sven Gothel <[email protected]> | 2020-04-20 12:05:07 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-04-20 12:05:07 +0200 |
commit | d123b2363692d4e95340aa63bf5246cd293b4f30 (patch) | |
tree | ca8188107f8a1f47505c6744b463be0404fc1d17 /examples | |
parent | f6fcec6415006918c0d938659379034fad9a2c72 (diff) |
HCIComm thread safety, resolve deadlock; Renaming: MgmtHandler -> DBTManager, revert DBTSession -> HCISession
HCIComm thread safety
With the java DBTAdapter, we have introduces multithreading access
to the HCIComm instance: start/stop etc + discovery-thread.
We have experienced a deadlock issuing stopDiscovery()
while the discovery-thread is in progress.
HCIComm and its dd is now locked using a recursive mutex,
which is also being exposed to HCISession allowing
DBTAdapter's discovery to use it as well.
+++
Renaming: MgmtHandler -> DBTManager, revert DBTSession -> HCISession
HCISession is not a major DBT (direct-bt) (java) instance
and actually describing the HCI(Comm) session.
DBTManager is a major DBT java instance, mapped.
Hence also splitting MgmtComm.* -> MgmtTypes.* + DBTManager.*
Diffstat (limited to 'examples')
-rw-r--r-- | examples/direct_bt_scanner/dbt_scanner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/direct_bt_scanner/dbt_scanner.cpp b/examples/direct_bt_scanner/dbt_scanner.cpp index fcce3a22..81611565 100644 --- a/examples/direct_bt_scanner/dbt_scanner.cpp +++ b/examples/direct_bt_scanner/dbt_scanner.cpp @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) const int64_t t0 = direct_bt::getCurrentMilliseconds(); - std::shared_ptr<direct_bt::DBTSession> session = adapter.open(); + std::shared_ptr<direct_bt::HCISession> session = adapter.open(); while( ok && !done && nullptr != session ) { ok = adapter.startDiscovery(*session); |