src/bufferPool.c File Reference

More...

#include "tll_common.h"
#include "bufferPool.h"

Include dependency graph for bufferPool.c:


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

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

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