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