James Kuszmaul e3191b0bfd Prevent PID tests from hanging.
For the previous couple of months, the PID tests have been hanging.

The reason that the tests have been hanging lies with the Notifier,
not the PID controller. Basically, a deadlock was occuring during
Notifier destruction when the notifier destructor was called while
the notifier interrupt handler was being called. Because the low-level
interrupt manager waits for the interrupt handler to finish executing before
disabling itself, the notifier destructor would not exit until the
ProcessQueue function finished. However, at the same time, the handler
was attempting to lock the queueMutex before continuing; the Notifier
destructor had locked the queueMutex while wrapping things up, meaning
that the last run of the handler would not complete until the destructor
did, resulting in a deadlock.

In order to repair this, I reduced the scope of the lock on the queueMutex
in the destructor so that it only locks when absolutely necessary. This
should work now.

This bug was likely introduced over the summer when we updated to stl
mutexes and locks, which may have messed up the original lock structure.

This likely did not affect any teams, as it can only occur if you are actively
destroying every* Notifier object present and if the destructor happens to be
called while the handler is being run.
*Note: the component of the destructor causing issues only ran if the last
  Notifier object is being destroyed.

Change-Id: I38ba4e60816a2a8d523e927c25378390a0755444
2015-11-27 21:37:10 -08:00
2015-11-21 18:26:49 -05:00
2015-11-25 20:37:24 -08:00
2015-11-21 18:26:49 -05:00
2015-11-27 21:37:10 -08:00
2014-03-03 11:30:55 -05:00
2015-11-21 18:26:49 -05:00
2015-08-18 10:39:25 -04:00
2015-11-21 18:26:49 -05:00
2015-08-18 10:39:25 -04:00
2015-11-21 18:26:49 -05:00
2015-11-21 18:26:49 -05:00
2015-09-19 17:40:32 -04:00
2015-11-21 18:26:49 -05:00
Description
WPILib - FRC Robotics Library
466 MiB
Languages
C++ 53.8%
Java 32.7%
Python 6.6%
C 2.6%
Jinja 1.7%
Other 2.5%