GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / V2-12-1 > pbs / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

TOV.h.px-xxx-xxx File Reference

Defines the representation of a timeout value for a POSIX compliant platform. More...

#include <PBS/impl/TSS.h.px-xxx-xxx>
#include <PBI/Endianness.h>

Classes

union  _TOV_u
 This is a union between the representation of a TOV exposed to the user and the actual representation. More...

Defines

#define TOV_K_FOREVER   (-1)
 The TOV value corresponding to an indefinite wait. The actual value and representation is platform dependent. On some platforms this may be implemented as an inline routine.
#define TOV_K_NOWAIT   (0)
 The TOV value corresponding to an no waiting. The actual value and representation is platform dependent. On some platforms this may be implemented as an inline routine.
#define TOV_IS_FOREVER(_tov)   ((_tov) == TOV_K_FOREVER)
 Checks if the specified TOV value tov, is the TOV forever value.
#define TOV_IS_NOWAIT(_tov)   ((_tov) == TOV_K_NOWAIT)
 Checks if the specified TOV value tov, is the TOV nowait value.
#define TOV_SECS(_tov)
 Returns the number of full seconds in the timeout value.
#define TOV_NSECS(_tov)
 Returns the number of nanoseconds in the timeout value.
#define TOV_FROM_SECS_NSECS(_secs, _nsecs)
 Converts the specified number of seconds and nanoseconds to a TOV value.
#define TOV_EXTRACT_SECS_NSECS(_tov, _secs, _nsecs)
 Extracts the number of seconds/nanoseconds.

Typedefs

typedef unsigned long long TOV
 An implementation dependent definition of the time out services.
typedef union _TOV_u TOV_u
 Typedef for union _TOV_u.


Detailed Description

Defines the representation of a timeout value for a POSIX compliant platform.

Author:
JJRussell - russell@slac.stanford.edu

    CVS $Id: TOV.h.px-xxx-xxx,v 1.5 2011/03/24 23:05:45 apw Exp $

Define Documentation

#define TOV_EXTRACT_SECS_NSECS ( _tov,
_secs,
_nsecs   ) 

Value:

{                                                   \
   _secs  = TOV_SECS (_tov);                        \
   _nsecs = TOV_NSECS(_tov);                        \
}
Extracts the number of seconds/nanoseconds.

Parameters:
_tov The tov to breack down
_secs The number of full seconds in the specified TOV
_nsecs The number of nanoseconds remaining after the full seconds
The implementation of this macro is platform dependent.

#define TOV_FROM_SECS_NSECS ( _secs,
_nsecs   ) 

Converts the specified number of seconds and nanoseconds to a TOV value.

Parameters:
_secs The number of seconds (presumably since the epoch)
_nsecs The number of nanoseconds (a delta less than 1 billion)
Returns:
The corresponding TOV.
The implementation of this macro is platform dependent.

#define TOV_IS_FOREVER ( _tov   )     ((_tov) == TOV_K_FOREVER)

Checks if the specified TOV value tov, is the TOV forever value.

Parameters:
_tov The TOV value to be checked.
Returns:
Non zero if true, else 0.

#define TOV_IS_NOWAIT ( _tov   )     ((_tov) == TOV_K_NOWAIT)

Checks if the specified TOV value tov, is the TOV nowait value.

Parameters:
_tov The TOV value to be checked.
Returns:
Non zero if true, else 0.

#define TOV_NSECS ( _tov   ) 

Returns the number of nanoseconds in the timeout value.

Parameters:
_tov The timeout value to extract the number of nanoseconds from
Returns:
The fractional number of nanoseconds in the timeout value
This macro, along with TOV_SECS(), allows the user to breakdown a timeout value into seconds and nanoseconds. The user may also wish to consider using macro TOV_EXTRACT_SECS_NSECS(), which, on some platforms, is a more efficient means of breaking a timeout value down.

Referenced by TASK_wait().

#define TOV_SECS ( _tov   ) 

Returns the number of full seconds in the timeout value.

Parameters:
_tov The timeout value to extract the number of seconds from
Returns:
The number of full seconds in the timeout value
This macro, along with TOV_NSECS(), allows the user to breakdown a timeout value into seconds and nanoseconds. The user may also wish to consider using macro TOV_EXTRACT_SECS_NSECS(), which, on some platforms, is a more efficient means of breaking a timeout value down.

Referenced by TASK_wait().


Typedef Documentation

TOV

An implementation dependent definition of the time out services.

This data structure should not be manipulated by an user code. The only reason this data structure is exposed is to allow the user to declare an instance of a TOV. The user should only use the declared routines to interface with a TOV.

Typedef for union _TOV_u.

This is a union between the representation of a TOV exposed to the user and the actual representation. It facilitates transforming the user representation to the implemetation specific representation. The user should never use this, since this is an implementation dependent definition. It defined here so that supporting functions can be implemented.


Generated on Sat Apr 9 18:27:08 2011 by  doxygen 1.5.8