Defines signature of POOL API Functions.
============================================================================
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ============================================================================
#include <dsplink.h>
#include <pooldefs.h>
Go to the source code of this file.
Defines | |
#define | POOL_Open POOL_open |
#define | POOL_Close POOL_close |
#define | POOL_Alloc POOL_alloc |
#define | POOL_Free POOL_free |
#define | POOL_TranslateAddr POOL_translateAddr |
Functions | |
DLLEXPORT DSP_STATUS | POOL_open (IN PoolId poolId, IN Pvoid params) |
This function opens a specific pool referenced by the pool Id provided. | |
DLLEXPORT DSP_STATUS | POOL_close (IN PoolId poolId) |
This function closes a specific pool whose pool id is provided. | |
DLLEXPORT DSP_STATUS | POOL_alloc (IN PoolId poolId, OUT Pvoid *bufPtr, IN Uint32 size) |
This function allocates a buffer of the specified size from a pool. | |
DLLEXPORT DSP_STATUS | POOL_free (IN PoolId poolId, IN Pvoid buf, IN Uint32 size) |
This function frees a buffer into the specified pool. | |
DLLEXPORT DSP_STATUS | POOL_translateAddr (IN PoolId poolId, OUT Pvoid *dstAddr, IN AddrType dstAddrType, IN Pvoid srcAddr, IN AddrType srcAddrType) |
This function translates addresses between two address spaces for a buffer that was allocated from the pool. | |
DLLEXPORT DSP_STATUS | POOL_getPoolId (IN ProcessorId procId, IN Pvoid addr, IN AddrType addrType, OUT PoolId *poolId) |
This function gets the pool id of the buffer that was allocated from the pool. | |
DLLEXPORT DSP_STATUS | POOL_writeback (IN PoolId poolId, IN Pvoid buf, IN Uint32 size) |
This function write backs the content of the buffer to peer's. | |
DLLEXPORT DSP_STATUS | POOL_invalidate (IN PoolId poolId, IN Pvoid buf, IN Uint32 size) |
This function invalidates the content of the buffer. |
#define POOL_Open POOL_open |
============================================================================
============================================================================
#define POOL_Close POOL_close |
============================================================================
============================================================================
#define POOL_Alloc POOL_alloc |
============================================================================
============================================================================
#define POOL_Free POOL_free |
============================================================================
============================================================================
#define POOL_TranslateAddr POOL_translateAddr |
============================================================================
============================================================================
DLLEXPORT DSP_STATUS POOL_open | ( | IN PoolId | poolId, |
IN Pvoid | params | ||
) |
This function opens a specific pool referenced by the pool Id provided.
============================================================================
poolId | Pool Identification number. |
params | POOL Open specific parameters. |
DLLEXPORT DSP_STATUS POOL_close | ( | IN PoolId | poolId ) |
This function closes a specific pool whose pool id is provided.
============================================================================
poolId | Pool Identification number. |
DLLEXPORT DSP_STATUS POOL_alloc | ( | IN PoolId | poolId, |
OUT Pvoid * | bufPtr, | ||
IN Uint32 | size | ||
) |
This function allocates a buffer of the specified size from a pool.
============================================================================
poolId | Pool Identification number. |
bufPtr | Location to receive a pointer to the allocated buffer. |
size | Size of buffer to be allocated. |
DLLEXPORT DSP_STATUS POOL_free | ( | IN PoolId | poolId, |
IN Pvoid | buf, | ||
IN Uint32 | size | ||
) |
This function frees a buffer into the specified pool.
============================================================================
poolId | Pool Identification number. |
buf | Pointer to the buffer to be freed. |
size | Size of buffer to be freed. |
DLLEXPORT DSP_STATUS POOL_translateAddr | ( | IN PoolId | poolId, |
OUT Pvoid * | dstAddr, | ||
IN AddrType | dstAddrType, | ||
IN Pvoid | srcAddr, | ||
IN AddrType | srcAddrType | ||
) |
This function translates addresses between two address spaces for a buffer that was allocated from the pool.
============================================================================
poolId | Pool Identification number. |
dstAddr | Location to receive the translated address. |
dstAddrType | Type of address to be translated to. |
srcAddr | Address of the buffer to be translated. |
srcAddrType | Type of address of the buffer to be translated. |
DLLEXPORT DSP_STATUS POOL_getPoolId | ( | IN ProcessorId | procId, |
IN Pvoid | addr, | ||
IN AddrType | addrType, | ||
OUT PoolId * | poolId | ||
) |
This function gets the pool id of the buffer that was allocated from the pool.
============================================================================
procId | Processor Identifier. |
addr | Address of the buffer whose pool id has to be determined. |
addrType | Type of address of the buffer whose pool id has to be determined. |
poolId | Location to receive pool id number. |
DLLEXPORT DSP_STATUS POOL_writeback | ( | IN PoolId | poolId, |
IN Pvoid | buf, | ||
IN Uint32 | size | ||
) |
This function write backs the content of the buffer to peer's.
============================================================================
poolId | Pool Identification number. |
buf | Pointer to the buffer to be invalidated. |
size | Size of buffer to be freed. |
DLLEXPORT DSP_STATUS POOL_invalidate | ( | IN PoolId | poolId, |
IN Pvoid | buf, | ||
IN Uint32 | size | ||
) |
This function invalidates the content of the buffer.
============================================================================
poolId | Pool Identification number. |
buf | Pointer to the buffer to be invalidated. |
size | Size of buffer to be freed. |