diff options
Diffstat (limited to 'api/direct_bt/DBTManager.hpp')
-rw-r--r-- | api/direct_bt/DBTManager.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/api/direct_bt/DBTManager.hpp b/api/direct_bt/DBTManager.hpp index 05f93aae..754a3a6b 100644 --- a/api/direct_bt/DBTManager.hpp +++ b/api/direct_bt/DBTManager.hpp @@ -168,13 +168,15 @@ namespace direct_bt { HCIComm comm; LFRingbuffer<std::shared_ptr<MgmtEvent>, nullptr> mgmtEventRing; - std::thread mgmtReaderThread; + std::atomic<pthread_t> mgmtReaderThreadId; std::atomic<bool> mgmtReaderRunning; std::atomic<bool> mgmtReaderShallStop; - std::mutex mtx_mgmtReaderInit; + std::mutex mtx_mgmtReaderLifecycle; std::condition_variable cv_mgmtReaderInit; std::recursive_mutex mtx_sendReply; // for sendWithReply + std::atomic<bool> allowClose; + /** One MgmtAdapterEventCallbackList per event type, allowing multiple callbacks to be invoked for each event */ std::array<MgmtAdapterEventCallbackList, static_cast<uint16_t>(MgmtEvent::Opcode::MGMT_EVENT_TYPE_COUNT)> mgmtAdapterEventCallbackLists; std::recursive_mutex mtx_callbackLists; |