GLAST/LAT >
DAQ and FSW >
FSW >
Doxygen Index >
PBS / V2-10-10
Constituent: test_spin     Tag: mv2304
Interface Data Structures File List Data Fields Globals
test_spin.c File Reference
Unit test for the SPIN facility. More...
Detailed Description
Unit test for the SPIN facility.
- Author:
- JJRussell - russell@slac.stanford.edu
The SPIN facility is meant to fill the need of sleeping the CPU when the timer interrupts offered by the WUT facility are either
- Too expensive in relation to the amount of time to sleep, typically < 5 - 50usecs
or are
- Inappropriate, typically when interrupts are not available, such as at boot time.
The SPIN offers two basic styles of spin
- Spin for a delta time
- Spin until an absolute time is reached.
The former is the simpler, where one waits for a period of time to expire. The second choice allows the user to compute an absolute time, carry on with his work, and periodically check whether the absolute time has been reached.
The test can be run from the command line by typing
- Warning:
- The resolution of the LINUX timers is likely around .01 seconds. This means that the minimum sleep time is .01 seconds and that all sleep times are likely rounded up to this quantum. Those requesting a sleep time of .1 seconds will likely resolute in an actual sleep time of 1.1 seconds. The SOLARIS timers are much better, giving something like 1 usecond resolution.
Generated on Mon Nov 20 05:20:42 2006 by
1.4.4