02-24-2009 03:26 PM
Joe,
Thank you; I must have stepped through that routine ten times without checking the semaphore - I thought it complain if there was a problem.
I changed the code in AnalogModule.cpp to read:
static SEM_ID semaphore = semMCreate(SEM_DELETE_SAFE | SEM_INVERSION_SAFE | SEM_Q_PRIORITY);
Two questions:
1) are there any other files that need updating?
2) once I update them how do I get Wind River to use the updated source files? (Isn't it using WPILib.a now)
Regards,
David
02-24-2009 04:21 PM
David,
1. There are no other files that need to be updated to fix the AI problem. As noted on the FIRST forums, however, the problem also exists in other subsystems. If you are wanting to fix those subsystems in your build as well, just grep for semMCreate and make sure each instance is using the corrected options. The other case that is broken is the "Relay" class. If you look in DigitalModule.cpp, you can see the TODOs where the semaphores are needed.
2. After you build the new library, you need to run the "Scripts/updateBuiltInLibrary.cmd" in the WPILib source directory after building the WPILib project. It will replace the files in the install locations of the WindRiver directory.
Since this is rather serious, I'm gonna check with the powers that be about the possibility of another update.
-Joe
03-01-2009 08:55 AM
Does this update fix your problem? http://forums.usfirst.org/showthread.php?t=12174
Be sure the read the disclaimer.