GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PBS / V2-10-6

Constituent: pbs     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

Q.ih File Reference

Doubly linked list, inline version. More...

#include "PBI/Inline.h"
#include "PBI/Attribute.h"
#include "PBS/Q_pubdefs.h"

Include dependency graph for Q.ih:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Defines

#define Q__EXP_PROTO   INLINE_USR_EXP_PROTO
 Export Prototype spec.

#define Q__LCL_PROTO   INLINE_USR_LCL_PROTO
 Internal Prototype spec.

#define Q__EXP_FNC   INLINE_USR_EXP_FNC
 Export Function declaration.

#define Q__LCL_FNC   INLINE_USR_LCL_FNC
 Internal Function declaration.


Functions

Q__EXP_PROTO void Q__append (Q_head *dst, Q_head *src) ATTR_UNUSED_OK
 Appends the src que members to the dst que.

Q__EXP_PROTO void Q__destroy (Q_head *que) ATTR_UNUSED_OK
 Destroys the data structures associate with the que.

Q__EXP_PROTO int Q__empty (Q_head *que) ATTR_UNUSED_OK
 Returns non zero if the que is empty.

Q__EXP_PROTO void Q__init (Q_head *que) ATTR_UNUSED_OK
 Initializes a que (doubly linked list) to an empty que.

Q__EXP_PROTO Q_nodeQ__insert (Q_head *que, Q_node *node) ATTR_UNUSED_OK
 Adds a node to the tail of a previously initialized que.

Q__EXP_PROTO Q_nodeQ__jam (Q_head *que, Q_node *node) ATTR_UNUSED_OK
 Adds a node to the head of a previously initialized que.

Q__EXP_PROTO void Q__prepend (Q_head *dst, Q_head *src) ATTR_UNUSED_OK
 Prepends the src que members to the que list.

Q__EXP_PROTO Q_nodeQ__remove (Q_head *que) ATTR_UNUSED_OK
 Removes the node from the tail of a previously initialized que. An empty que returns NULL as its node.

Q__EXP_PROTO Q_nodeQ__unlink (const Q_node *node) ATTR_UNUSED_OK
 Removes the specified node from the que.


Detailed Description

Doubly linked list, inline version.

Author:
JJRussell - russell@slac.stanford.edu

    CVS $Id: Q.ih,v 1.3 2005/10/01 01:00:12 russell Exp $

This defines the inline versions of the Que routines. These allow the the user to build non-interlocked doubly linked lists. These routines parallel some of the functionality of the VxWorks llxxxx routines, but are portable to both VxWorks and host platforms.

See also the non-inlined versions of these routines which offer possible savings in code space and increased modularity at the expense of some performance. The QI routines provide the same functionality with the added feature of being interlocked, and, therefore, thread safe.


Function Documentation

Q__EXP_FNC void Q__append Q_head dst,
Q_head src
 

Appends the src que members to the dst que.

Parameters:
dst A previously initialized que acting as the destination
src A previously initialized que acting as the source
Appends the source que to the destination que. After this operation the destination que will have consist of its original members followed by the members on the source que. The source que will be empty.

Q__EXP_FNC void Q__destroy Q_head que  ) 
 

Destroys the data structures associate with the que.

Parameters:
que Pointer to the que to destroy.
Currently this routine is effectively a NO-OP, but is provided for upward compatibility, just in case at some time in the future this operations does something meaningful.

Q__EXP_FNC int Q__empty Q_head que  ) 
 

Returns non zero if the que is empty.

Returns:
Non zero if the que is empty list, else 0
Parameters:
que Pointer to the que to initialize.

Q__EXP_FNC void Q__init Q_head que  ) 
 

Initializes a que (doubly linked list) to an empty que.

Parameters:
que Pointer to the que to initialize.
The que is initialized to an empty que. This must be done before performing any other operations on the que.

Q__EXP_FNC Q_node * Q__insert Q_head que,
Q_node node
 

Adds a node to the tail of a previously initialized que.

Parameters:
que A previously initialized que.
node The node to add at the tail of the que
Returns:
Pointer to the old backward link. This can be used to test whether this was the first item on the que.
If return_value == que, then empty
Adds the specified node to the tail of the que. If all nodes are added with the Q__insert routine, the que behaves as a FIFO.

Q__EXP_FNC Q_node * Q__jam Q_head que,
Q_node node
 

Adds a node to the head of a previously initialized que.

Parameters:
que A previously initialized que.
node The node to add.
Returns:
Pointer to the old forward link. This can be used to test whether this was the first item on the que.
If return_value == &que, theN empty
Adds the specified node to the head of the que. If all nodes are added with the Q__jam routine, the que behaves as a LIFO.

Q__EXP_FNC void Q__prepend Q_head dst,
Q_head src
 

Prepends the src que members to the que list.

Parameters:
dst A previously initialized que acting as the destination
src A previously initialized que acting as the source
Prepends the source que to the destination que. After this operation the destination que will have consist of its original members preceded by the members on the source que. The source que will be empty.

Q__EXP_FNC Q_node * Q__remove Q_head que  ) 
 

Removes the node from the tail of a previously initialized que. An empty que returns NULL as its node.

Parameters:
que A previously initialized que.
Returns:
A pointer to the removed node of NULL if the que is empty.

Removes the node at the head of the que. If the que is empty, NULL is returned.

Q__EXP_FNC Q_node * Q__unlink const Q_node node  ) 
 

Removes the specified node from the que.

Parameters:
node The node to unlink from the que
Returns:
Pointer to the forward link of the removed node.
Removes the specified node from a previously initialized que.


Generated on Fri Sep 30 23:53:10 2005 by doxygen 1.3.3