GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > IPBS / V0-0-1
Constituent: pbs     Tag: i845e
#include "IPBS/FPA.h"
#include "IPBS/LI.h"
#include "IPBS/LI.ih"
Include dependency graph for FPA.c:
Data Structures | |
struct | _FPA_fcb |
Layouts the control structure for managing the list of free packets. This structure is private to the FPA utility. More... | |
Functions | |
static __inline FPA_pcb * | allocate (FPA_fcb *fcb, int offset) |
Basic non-interlocked version of the routine to allocate a packet from the free list. | |
int | FPA_fcb_sizeof () |
Returns the size of the Fixed Packet Allocator control block. | |
int | FPA_init (FPA_fcb *fcb, FPA_type type, void *buffer, int buf_size, int packet_size, int pcb_offset, FPA_init_cb init_routine, void *init_parameter) |
Configures a user supplied piece of memory as a collection of fixed size packets which can be allocated and deallocated. | |
int | FPA_destroy (FPA_fcb *fcb) |
Releases any resources gathered at initialization time. | |
void __inline * | FPA_get (FPA_fcb *fcb) |
Get or allocate a packet from the free list. | |
void * | FPA_getW (FPA_fcb *fcb) |
Get or allocate a packet from the free list with a indefinite blocking. | |
void * | FPA_getW_toc (FPA_fcb *fcb, const TOC *toc) |
Get or allocate a packet from the free list using the timeout specified by TOC. | |
int | FPA_free (FPA_fcb *fcb, void *packet) |
Returns a previously allocated packet to the free list. |
CVS $Id: FPA.c,v 1.1.1.1 2006/02/10 21:45:33 saxton Exp $
|
Basic non-interlocked version of the routine to allocate a packet from the free list.
|
|
Releases any resources gathered at initialization time.
|
|
Returns the size of the Fixed Packet Allocator control block.
This call is for modularity reasons. The user can learn the size of memory needed by the FPA utility to manage a pool of packets without needing to know the details of how it is laid out. This could have also been achieved by having the FPA initialization routine allocate the control block, but this takes away the freedom of the user to control his own allocation and deallocation |
|
Returns a previously allocated packet to the free list.
|
|
Get or allocate a packet from the free list.
|
|
Get or allocate a packet from the free list with a indefinite blocking.
|
|
Get or allocate a packet from the free list using the timeout specified by TOC.
|
|
Configures a user supplied piece of memory as a collection of fixed size packets which can be allocated and deallocated.
Various options allow the user to place where the control structure lives within the packet and determine the blocking style. The most usual choice for the placement of the packet control structure is at the beginning pcb_offset = 0, or at the end pcb_offset = -1, although the user is allowed to specify any offset, provided it is within the packet. The usual blocking style is FPA_K_TYPE_FIFO_BLOCKING.
|