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
   CVS $Id

The SPIN facility is meant to fill the need of sleeping the CPU when the timer interrupts offered by the WUT facility are either

or are

The SPIN offers two basic styles of spin

  1. Spin for a delta time
  2. 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

   $ test_spin

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  doxygen 1.4.4