GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > DUMP / V0-0-2

Constituent: dump     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

list.h File Reference

Publis definitions for the linked list routines. More...

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


Typedefs

typedef LL_node_ LL_node
 Forward declaration of the LL_node structure.

Functions

int LL_registerNode (LL_node *head, unsigned int uid, void *pay)
 Create a node with a unique ID.
void * LL_unregisterNode (LL_node *head, unsigned int uid)
 Remove the spcified node.
void * LL_getPayload (LL_node *head, unsigned int uid)
 Get the payload corresponding to a give id.
int LL_isPresent (LL_node *head, unsigned int uid)
 Check if an ID exists.

Detailed Description

Publis definitions for the linked list routines.

Author:
James Swain & Owen Saxton
Id
list.h,v 1.2 2007/10/26 21:49:16 saxton Exp

Function Documentation

void* LL_getPayload LL_node head,
unsigned int  uid
 

Get the payload corresponding to a give id.

Parameters:
head Pointer to the start of the linked list
uid Unique ID
Returns:
Pointer to payload associated with the specified ID or NULL if the ID doesn't exist.

int LL_isPresent LL_node head,
unsigned int  uid
 

Check if an ID exists.

This routine searches for a node with the given ID.

Parameters:
head Pointer to the start of the linked list
uid Unique ID
Return values:
1 If there is a node on the list with this ID
Returns:
0 If no node has this ID

int LL_registerNode LL_node head,
unsigned int  uid,
void *  pay
 

Create a node with a unique ID.

This routine creates a node with the specified UID and payload. It is an error if a node with the ID already exists.

Parameters:
head Pointer to the start of the list of LL handlers
uid Unique id for this node
pay Pointer to the payload.
Return values:
0 The new node was successfully created
1 The ID already existed; use replace
-1 Memory allocation failed

void* LL_unregisterNode LL_node head,
unsigned int  uid
 

Remove the spcified node.

This routine removes the node with the specified ID from a list, and returns its payload pointer.

Parameters:
head Pointer to the start of the list of LL handlers
uid Unique id for the node to remove
Returns:
Pointer to the payload of the unregistered node, or NULL if the node does not exist


Generated on Thu Apr 17 01:16:28 2008 by  doxygen 1.4.4