GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> IPBS / V0-0-2 > pbs / i845e


Interface   Data Structures   File List   Data Fields   Globals  

PL_pubdefs.h File Reference

Priority Lists, public data structures. More...

#include <PBI/Ofs.h>
#include <IPBS/L_pubdefs.h>
#include <IPBS/RW_pubdefs.h>
#include <IPBS/PL_comdefs.h>

Classes

struct  _PL_que
 The definition of a single priority que. More...
struct  _PL_ctl
 The PL control structure. 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.2 2011/03/25 21:15:01 saxton 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);
   

Referenced by FORK_create(), and FORK_fcb_sizeof().

#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 Wed Nov 21 21:23:54 2012 by  doxygen 1.5.8