hidraw support for udev; fix race condition

This commit is contained in:
Jack Andersen
2017-05-08 17:37:12 -10:00
parent ff89a9cccf
commit 7823aecc57
6 changed files with 109 additions and 32 deletions

View File

@@ -325,9 +325,13 @@ public:
: m_token(token),
m_devImp(devImp),
m_devPath(token.getDevicePath())
{
}
void _startThread()
{
std::unique_lock<std::mutex> lk(m_initMutex);
DeviceType dType = token.getDeviceType();
DeviceType dType = m_token.getDeviceType();
if (dType == DeviceType::USB)
m_thread = std::thread(_threadProcUSBLL, this);
else if (dType == DeviceType::Bluetooth)