Use wpi::mutex instead of std::mutex. (#105)

This uses a priority-aware mutex on Linux platforms.
This commit is contained in:
Peter Johnson
2017-11-13 09:51:26 -08:00
committed by GitHub
parent 55fa1e5e76
commit e301adb22b
17 changed files with 123 additions and 122 deletions

View File

@@ -9,10 +9,10 @@
#define CSCORE_SINKIMPL_H_
#include <memory>
#include <mutex>
#include <string>
#include <llvm/StringRef.h>
#include <support/mutex.h>
#include "SourceImpl.h"
@@ -39,7 +39,7 @@ class SinkImpl {
void SetSource(std::shared_ptr<SourceImpl> source);
std::shared_ptr<SourceImpl> GetSource() const {
std::lock_guard<std::mutex> lock(m_mutex);
std::lock_guard<wpi::mutex> lock(m_mutex);
return m_source;
}
@@ -49,7 +49,7 @@ class SinkImpl {
protected:
virtual void SetSourceImpl(std::shared_ptr<SourceImpl> source);
mutable std::mutex m_mutex;
mutable wpi::mutex m_mutex;
private:
std::string m_name;