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_protos.h File Reference

Doubly linked list, function prototypes, callable version. More...

#include "PBS/Q_comdefs.h"

Include dependency graph for Q_protos.h:

Include dependency graph

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

Included by dependency graph

Functions

void Q_append (Q_head *dst, Q_head *src)
 Appends the src que members to the dst que.

void Q_init (Q_head *que)
 Initializes a que (doubly linked list) to an empty que.

void Q_destroy (Q_head *que)
 Destroys the data structures associate with the que.

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

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

void Q_prepend (Q_head *dst, Q_head *src)
 Prepends the src que members to the que list.

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

Q_nodeQ_unlink (const Q_node *node)
 Removes the specified node from the que.


Detailed Description

Doubly linked list, function prototypes, callable version.

Author:
JJRussell - russell@slac.stanford.edu

    CVS $Id: Q_protos.h,v 1.2 2004/10/20 14:36:51 russell Exp $

SYNOPSIS
This defines the non-inline versions of the Que routines. These allow 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-inline versions of these routines which may save code space and increase modularity at the expense of performance. The QI routines provide the same functionality with the added feature of being interlocked, and, therefore, thread safe.

Function Documentation

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.

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.

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_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_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.

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_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_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:14 2005 by doxygen 1.3.3