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

This uses a priority-aware mutex on Linux platforms.

Fixes #729.
This commit is contained in:
Peter Johnson
2017-11-13 09:51:48 -08:00
committed by GitHub
parent 35d68d2a34
commit 4d559f3856
86 changed files with 491 additions and 839 deletions

View File

@@ -10,11 +10,12 @@
#include <list>
#include <map>
#include <memory>
#include <mutex>
#include <set>
#include <string>
#include <vector>
#include <support/mutex.h>
#include "Commands/Command.h"
#include "ErrorBase.h"
#include "SmartDashboard/NamedSendable.h"
@@ -53,11 +54,11 @@ class Scheduler : public ErrorBase, public NamedSendable {
void ProcessCommandAddition(Command* command);
Command::SubsystemSet m_subsystems;
std::mutex m_buttonsLock;
wpi::mutex m_buttonsLock;
typedef std::vector<ButtonScheduler*> ButtonVector;
ButtonVector m_buttons;
typedef std::vector<Command*> CommandVector;
std::mutex m_additionsLock;
wpi::mutex m_additionsLock;
CommandVector m_additions;
typedef std::set<Command*> CommandSet;
CommandSet m_commands;