GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / dev > test_fork / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

test_fork.c File Reference

Unit test for the FORK routines. More...


Detailed Description

Unit test for the FORK routines.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id

The FORK routines are the mainstay of multitasking programming for the LAT Flight Software (FSW). They provide a convenient metaphor for calling routines across task boundaries. This is accomplished by queing messages in an interlocked fashion (posting) and receiving them in another task (pending). On the pend side, the message is dispatched to a routine specified as part of the message. The user of the FORK routine should view his coding job as providing services in the form series of a event handlers (event, in the computer sense of the word). Since messages are processed one at a time, the caller is guaranteed serialization within the service. However, the caller may specify multiple FORK queues, each with their own priority, so, while each message is still handled serially, the use of multiple queues allows the service to handle messages in non- sequential order. A typical use of this feature is to inject out-of-band messages, such as abort or quit commands.

The test can be run from the command line by typing

   $ test_fork

Generated on Fri Aug 5 18:35:38 2011 by  doxygen 1.5.8