mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Moves the HAL priority_ custom types to the hal namespace (#532)
There is a shim for backwards compatibility, just like the frc namespace. As with the frc namespace, the library compiles without the shim.
This commit is contained in:
committed by
Peter Johnson
parent
16e71eac43
commit
efec0c5cc3
@@ -53,11 +53,11 @@ class Scheduler : public ErrorBase, public NamedSendable {
|
||||
void ProcessCommandAddition(Command* command);
|
||||
|
||||
Command::SubsystemSet m_subsystems;
|
||||
priority_mutex m_buttonsLock;
|
||||
hal::priority_mutex m_buttonsLock;
|
||||
typedef std::vector<ButtonScheduler*> ButtonVector;
|
||||
ButtonVector m_buttons;
|
||||
typedef std::vector<Command*> CommandVector;
|
||||
priority_mutex m_additionsLock;
|
||||
hal::priority_mutex m_additionsLock;
|
||||
CommandVector m_additions;
|
||||
typedef std::set<Command*> CommandSet;
|
||||
CommandSet m_commands;
|
||||
|
||||
@@ -113,7 +113,7 @@ class ErrorBase {
|
||||
protected:
|
||||
mutable Error m_error;
|
||||
// TODO: Replace globalError with a global list of all errors.
|
||||
static priority_mutex _globalErrorMutex;
|
||||
static hal::priority_mutex _globalErrorMutex;
|
||||
static Error _globalError;
|
||||
};
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ class PIDController : public LiveWindowSendable,
|
||||
std::queue<double> m_buf;
|
||||
double m_bufTotal = 0;
|
||||
|
||||
mutable priority_recursive_mutex m_mutex;
|
||||
mutable hal::priority_recursive_mutex m_mutex;
|
||||
|
||||
std::unique_ptr<Notifier> m_controlLoop;
|
||||
Timer m_setpointTimer;
|
||||
|
||||
@@ -43,9 +43,9 @@ class Resource : public ErrorBase {
|
||||
|
||||
private:
|
||||
std::vector<bool> m_isAllocated;
|
||||
priority_recursive_mutex m_allocateLock;
|
||||
hal::priority_recursive_mutex m_allocateLock;
|
||||
|
||||
static priority_recursive_mutex m_createLock;
|
||||
static hal::priority_recursive_mutex m_createLock;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
@@ -51,7 +51,7 @@ class Timer {
|
||||
double m_startTime = 0.0;
|
||||
double m_accumulatedTime = 0.0;
|
||||
bool m_running = false;
|
||||
mutable priority_mutex m_mutex;
|
||||
mutable hal::priority_mutex m_mutex;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
Reference in New Issue
Block a user