Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

buf_pool.h

Go to the documentation of this file.
00001 /** ============================================================================
00002  *  @file   buf_pool.h
00003  *
00004  *  @path   $(DSPLINK)/dsp/inc/
00005  *
00006  *  @brief  Defines the exported interface of the buffer pool.
00007  *
00008  *  @ver    1.65.00.03
00009  *  ============================================================================
00010  *  @copyright Copyright (C) 2002-2009, Texas Instruments Incorporated -
00011  *  http://www.ti.com/
00012  *
00013  *  Redistribution and use in source and binary forms, with or without
00014  *  modification, are permitted provided that the following conditions
00015  *  are met:
00016  *  
00017  *  *  Redistributions of source code must retain the above copyright
00018  *     notice, this list of conditions and the following disclaimer.
00019  *  
00020  *  *  Redistributions in binary form must reproduce the above copyright
00021  *     notice, this list of conditions and the following disclaimer in the
00022  *     documentation and/or other materials provided with the distribution.
00023  *  
00024  *  *  Neither the name of Texas Instruments Incorporated nor the names of
00025  *     its contributors may be used to endorse or promote products derived
00026  *     from this software without specific prior written permission.
00027  *  
00028  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00029  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00030  *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00031  *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00032  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00033  *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00034  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00035  *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00036  *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00037  *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00038  *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00039  *  ============================================================================
00040  */
00041 
00042 
00043 #ifndef BUF_POOL_
00044 #define BUF_POOL_
00045 
00046 
00047 /*  ----------------------------------- DSP/BIOS Headers            */
00048 #include <pool.h>
00049 
00050 
00051 #ifdef __cplusplus
00052 extern "C" {
00053 #endif
00054 
00055 
00056 /** ============================================================================
00057  *  @name   BUFPOOL_Params
00058  *
00059  *  @brief  Parameters required for initialization of the buffer pool.
00060  *
00061  *  @param  numBufObjs
00062  *              Number of entries in the arrays of buffer sizes and numbers in
00063  *              the params structure.
00064  *  @param  bufSizes
00065  *              Array of sizes of the buffers in the buffer pools.
00066  *              The sizes are in MADUs.
00067  *              This array is of size numBufObjs.
00068  *  @param  numBuffers
00069  *              Array of number of buffers in all buffer pools.
00070  *              This array is of size numBufObjs.
00071  *  @param  segId
00072  *              Segment ID for allocation of the buffers.
00073  *  ============================================================================
00074  */
00075 typedef struct BUFPOOL_Params_tag {
00076     Uint32     numBufObjs ;
00077     Uint32 *   bufSizes ;
00078     Uint32 *   numBuffers ;
00079     Uint16     segId ;
00080 } BUFPOOL_Params ;
00081 
00082 
00083 /** ============================================================================
00084  *  @name   BUFPOOL_FXNS
00085  *
00086  *  @brief  Declaration of the function table interface for the buffer pool.
00087  *  ============================================================================
00088  */
00089 extern const POOL_Fxns BUFPOOL_FXNS ;
00090 
00091 
00092 /** ============================================================================
00093  *  @func   BUFPOOL_init
00094  *
00095  *  @brief  Performs global initialization of the buffer pool.
00096  *          This function currently is not required to perform any
00097  *          initialization and hence is defined to the NOP function.
00098  *
00099  *  @param None
00100  *
00101  *  @return None
00102  *
00103  *  @pre    None
00104  *
00105  *  @post   None
00106  *
00107  *  @see    BUFPOOL_exit ()
00108  *  ============================================================================
00109  */
00110 #define BUFPOOL_init    FXN_F_nop
00111 
00112 
00113 /** ============================================================================
00114  *  @func   BUFPOOL_exit
00115  *
00116  *  @brief  Performs global finalization of the buffer pool.
00117  *          This function currently is not required to perform any
00118  *          finalization and hence is defined to the NOP function.
00119  *
00120  *  @param None
00121  *
00122  *  @return None
00123  *
00124  *  @pre    None
00125  *
00126  *  @post   None
00127  *
00128  *  @see    BUFPOOL_init ()
00129  *  ============================================================================
00130  */
00131 #define BUFPOOL_exit    FXN_F_nop
00132 
00133 
00134 #ifdef __cplusplus
00135 }
00136 #endif /* extern "C" */
00137 
00138 
00139 #endif /* BUF_POOL_ */

Generated on Fri Jul 16 14:34:01 2010 for DSP/BIOSLink by  doxygen 1.4.4