inc/bufferPool_d.h File Reference

#include "queue_d.h"
#include "isrDisp.h"
#include <chunk_d.h>

Include dependency graph for bufferPool_d.h:

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


Data Structures

struct  bufferPool_d_t
 bufferPool object More...

Functions

int bufferPool_d_init (bufferPool_d_t *pThis, int numChunks, int chunkSize)
 Initialize buffer pool
  • initialize freeList, populate with chunks.

int bufferPool_d_acquire (bufferPool_d_t *pThis, chunk_d_t **ppChunk, int chunkSize)
 Get a chunk from the buffer pool.
int bufferPool_d_release (bufferPool_d_t *pThis, chunk_d_t *pChunk)
 Release chunk into the free list
  • non blocking
  • error on null passed.

int bufferPool_d_is_empty (bufferPool_d_t *pThis)
 Returns true if buffer pool is empty.

Function Documentation

int bufferPool_d_acquire ( bufferPool_d_t pThis,
chunk_d_t **  ppChunk,
int  chunkSize 
)

Get a chunk from the buffer pool.

Parameters:

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

int bufferPool_d_init ( bufferPool_d_t pThis,
int  numChunks,
int  chunkSize 
)

Initialize buffer pool

Parameters:

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

int bufferPool_d_is_empty ( bufferPool_d_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 no chunks available

int bufferPool_d_release ( bufferPool_d_t pThis,
chunk_d_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