inc/bufferPool.h File Reference

More...

#include "queue.h"
#include "isrDisp.h"
#include <chunk.h>

Include dependency graph for bufferPool.h:

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


Data Structures

struct  bufferPool_t
 bufferPool object More...

Defines

#define CHUNK_NUM_MAX   (32)
 maximum number of chunks managed in this bufffer pool since we use static allocation, one number for all

Functions

int bufferPool_init (bufferPool_t *pThis)
 Initialize buffer pool
  • initialize freeList, populate with chunks.

int bufferPool_acquire (bufferPool_t *pThis, chunk_t **ppChunk)
 Get a chunk from the buffer pool.
int bufferPool_release (bufferPool_t *pThis, chunk_t *pChunk)
 Release chunk into the free list
  • non blocking
  • error on null passed.

int bufferPool_is_empty (bufferPool_t *pThis)
 Returns true if buffer pool is empty.

Detailed Description

Target: TLL6537v1-1 Compiler: VDSP++ Output format: VDSP++ "*.dxe"

Author:
Rohan Kangralkar
Date:
03/15/2009
LastChange:
Id
bufferPool.h 1069 2013-02-25 18:19:21Z ovaskevi

Define Documentation

#define CHUNK_NUM_MAX   (32)

maximum number of chunks managed in this bufffer pool since we use static allocation, one number for all


Function Documentation

int bufferPool_acquire ( bufferPool_t pThis,
chunk_t **  ppChunk 
)

Get a chunk from the buffer pool.

Parameters:

Parameters:
pThis pointer to queue data structure
ppChunk pointer pointer to chunk acquired (null if empty)
Returns:
PASS/Zero on success. Negative FAIL/value on failure.

int bufferPool_init ( bufferPool_t pThis  ) 

Initialize buffer pool

Parameters:

Parameters:
pThis pointer to buffer pool data structure
Returns:
PASS/Zero on success. FAIL/Negative value on failure.

int bufferPool_is_empty ( bufferPool_t pThis  ) 

Returns true if buffer pool is empty.

Parameters:

Parameters:
pThis pointer to queue data structure
Returns:
true (non-zero) if emtpy, 0 if chunks available

int bufferPool_release ( bufferPool_t pThis,
chunk_t pChunk 
)

Release chunk into the free list

Parameters:

Parameters:
pThis pointer to queue data structure
pChunk pointer to chunk to release
Returns:
PASS/Zero on success. FAIL/Negative value on failure.


Generated on 3 Mar 2014 for PAL bare-c Library by  doxygen 1.4.7