Replaced linked list in Notifier with std::list

Change-Id: I3bcb1195102d792db994dba98adc7425767b16e8
This commit is contained in:
Tyler Veness
2015-10-30 00:51:05 -07:00
committed by Peter Johnson
parent ce2245110b
commit d77f5c8019
3 changed files with 72 additions and 62 deletions

View File

@@ -33,8 +33,9 @@ Notifier::~Notifier() {
cleanNotifier(m_notifier, &status);
wpi_setErrorWithContext(status, getHALErrorMessage(status));
// Acquire the mutex; this makes certain that the handler is
// not being executed by the interrupt manager.
/* Acquire the mutex; this makes certain that the handler is not being
* executed by the interrupt manager.
*/
std::lock_guard<priority_mutex> lock(m_handlerMutex);
}
@@ -85,8 +86,8 @@ void Notifier::StartSingle(double delay) {
/**
* Register for periodic event notification.
* A timer event is queued for periodic event notification. Each time the
* interrupt
* occurs, the event will be immediately requeued for the same time interval.
* interrupt occurs, the event will be immediately requeued for the same time
* interval.
* @param period Period in seconds to call the handler starting one period after
* the call to this method.
*/
@@ -101,11 +102,9 @@ void Notifier::StartPeriodic(double period) {
/**
* Stop timer events from occuring.
* Stop any repeating timer events from occuring. This will also remove any
* single
* notification events from the queue.
* single notification events from the queue.
* If a timer-based call to the registered handler is in progress, this function
* will
* block until the handler call is complete.
* will block until the handler call is complete.
*/
void Notifier::Stop() {
int32_t status = 0;