Remove priority mutex (#644)

* Removed hal::priority_condition_variable

* Replaced uses of priority mutexes with std::mutex and std::recursive_mutex

This allowed replacing a use of std::condition_variable_any with
std::condition_variable.

* Replaced all uses of std::recursive_mutex with std::mutex equivalents
This commit is contained in:
Tyler Veness
2017-09-28 23:32:35 -07:00
committed by Peter Johnson
parent 19addb04cf
commit dd66b23845
44 changed files with 390 additions and 746 deletions

View File

@@ -26,7 +26,7 @@ namespace hal {
std::string SerialHelper::m_usbNames[2]{"", ""};
priority_mutex SerialHelper::m_nameMutex;
std::mutex SerialHelper::m_nameMutex;
SerialHelper::SerialHelper() {
viOpenDefaultRM(reinterpret_cast<ViSession*>(&m_resourceHandle));
@@ -287,7 +287,7 @@ done:
int32_t SerialHelper::GetIndexForPort(HAL_SerialPort port, int32_t* status) {
// Hold lock whenever we're using the names array
std::lock_guard<hal::priority_mutex> lock(m_nameMutex);
std::lock_guard<std::mutex> lock(m_nameMutex);
std::string portString = m_usbNames[port - 2];