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

Constituent: pbs     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

PL_pubdefs.h File Reference

Priority Lists, public data structures. More...

#include "PBI/Ofs.h"
#include "PBS/L_pubdefs.h"
#include "PBS/RW_pubdefs.h"
#include "PBS/PL_comdefs.h"

Include dependency graph for PL_pubdefs.h:

Include dependency graph

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

Included by dependency graph

Data Structures

struct  _PL_ctl
 The PL control structure. More...

struct  _PL_que
 The definition of a single priority que. More...


Defines

#define PL_SIZEOF(_nques)
 Computes the number of bytes needed for a PL of _nques.

#define PL_DECLARE(_name, _nques)   unsigned char _name[PL_SIZEOF(_nques)]
 Drops enough storage for a PL of _nques.

#define PL_USR_SET(_que, _value)   (_que)->usr = (void *)(_value)
 Sets the user defined location within the que.

#define PL_USR_GET(_que)   (_que)->usr
 Returns the value in the user defined location within the que.

#define PL_CTL_GET(_que)
 Locates the control block from a given que.


Detailed Description

Priority Lists, public data structures.

Author:
JJRussell - russell@slac.stanford.edu

    CVS $Id: PL_pubdefs.h,v 1.4 2004/05/12 16:19:03 russell Exp $

SYNOPSIS
This defines the control structures needed for the PL routines. The function prototypes for the non-inlined versions are defined in a separate file, since they do not depend on the structure definitions.

Define Documentation

#define PL_CTL_GET _que   ) 
 

Value:

((PL_ctl *)((unsigned char *)(_que) -  \
        (_que)->id * sizeof (*(_que))      -  \
        OFFSET_OF(PL_ctl, ques)))
Locates the control block from a given que.

Parameters:
_que Pointer to the target que
Returns:
Pointer to the PL control block
This routine allows the user to fetch the context value (a void *) which was previously set using PL_SET_USR()

#define PL_DECLARE _name,
_nques   )     unsigned char _name[PL_SIZEOF(_nques)]
 

Drops enough storage for a PL of _nques.

Parameters:
_name The name of the PL.
_nques The number of ques
This is used to drop enough storage for the a PL of _nques. Example

    / * Drops enough storage for a control structure and 5 ques * /
    PL_DECLARE (my_pl, 5);

    status = PL_init ((PL_ctl *)my_pl, PL_K_TYPE_BLOCKING_FIFO_WTO, 5);
   

#define PL_SIZEOF _nques   ) 
 

Value:

(sizeof(struct _PL_ctl) + \
                ((_nques) - 1) * sizeof(struct _PL_que))
Computes the number of bytes needed for a PL of _nques.

Parameters:
_nques The number of ques
This is used to drop enough storage for the a PL of _nques. Also see PL_DECLARE.

Example


    / * Drops enough storage for a control structure and 5 ques * /
    unsigned char my_pl[PL_SIZEOF (5)];

    status = PL_init ((PL_ctl *)my_pl, PL_K_TYPE_BLOCKING_FIFO_WTO, 5);
   

#define PL_USR_GET _que   )     (_que)->usr
 

Returns the value in the user defined location within the que.

Parameters:
_que Pointer to the target que
Returns:
The user defined value.
This routine allows the user to fetch the context value (a void *) which was previously set using PL_SET_USR()

#define PL_USR_SET _que,
_value   )     (_que)->usr = (void *)(_value)
 

Sets the user defined location within the que.

Parameters:
_que Pointer to the target que
_value The value.
This routine allows the user to carry a context value (a void *) along with que. The user may fetch this value later using PL_USR_GET(_que).


Generated on Tue Sep 13 20:46:55 2005 by doxygen 1.3.3