|
Re: Morse Code
Don't be afraid of threads. They are a very basic mechanism in any real-time or embedded code development. I know Dave Wilner personally and was involved in the periphery of the Pathfinder problem.
The confusion came as a result of something called the priority inversion problem that is common in real-time systems. In VxWorks, there are 3 different kinds of semaphores that are used for different purposes. The one that's used in the "CRITICAL_REGION/END_REGION" code is the mutual exclusion semaphore that caused the problems for Pathfinder. The problem with Pathfinder was that that semaphore was not created with the SEM_INVERSION_SAFE flag set. However, the constructor used in WPILib automatically set that flag, so you should be good.
Just make sure you protect any global variable accesses in the CRITICAL_REGION/END_REGION wrappers and everything should work fine.
Good Luck,
Mike
|