Defines | Functions

pool.h File Reference


Detailed Description

Defines signature of POOL API Functions.

============================================================================

Path:
/gpp/inc/usr/
Version:
1.65.01.06 ============================================================================
Copyright:
Copyright (C) 2002-2009, Texas Instruments Incorporated - https://www.ti.com/

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>
Include dependency graph for pool.h:
This graph shows which files directly or indirectly include this file:

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 Documentation

#define POOL_Open   POOL_open

============================================================================

Deprecated:
The deprecated API POOL_Open has been replaced with POOL_open. This has been done to follow DSP/BIOS codinf guidelines and have a uniform naming convention for the API's on both GPP as well as DSP.

============================================================================

#define POOL_Close   POOL_close

============================================================================

Deprecated:
The deprecated API POOL_Close has been replaced with POOL_close. This has been done to follow DSP/BIOS codinf guidelines and have a uniform naming convention for the API's on both GPP as well as DSP.

============================================================================

#define POOL_Alloc   POOL_alloc

============================================================================

Deprecated:
The deprecated API POOL_Alloc has been replaced with POOL_alloc. This has been done to follow DSP/BIOS codinf guidelines and have a uniform naming convention for the API's on both GPP as well as DSP.

============================================================================

#define POOL_Free   POOL_free

============================================================================

Deprecated:
The deprecated API POOL_Free has been replaced with POOL_free. This has been done to follow DSP/BIOS codinf guidelines and have a uniform naming convention for the API's on both GPP as well as DSP.

============================================================================

#define POOL_TranslateAddr   POOL_translateAddr

============================================================================

Deprecated:
The deprecated API POOL_TranslateAddr has been replaced with POOL_translateAddr. This has been done to follow DSP/BIOS codinf guidelines and have a uniform naming convention for the API's on both GPP as well as DSP.

============================================================================


Function Documentation

DLLEXPORT DSP_STATUS POOL_open ( IN PoolId  poolId,
IN Pvoid  params 
)

This function opens a specific pool referenced by the pool Id provided.

============================================================================

Function:
POOL_open
Parameters:
poolIdPool Identification number.
paramsPOOL Open specific parameters.
Returns:
DSP_SOK Operation completed successfully. DSP_SALREADYOPENED The specified POOL has already been opened. DSP_EACCESSDENIED Access to the DSP is denied. DSP_EINVALIDARG Invalid argument. DSP_EMEMORY Memory error. DSP_EFAIL General failure.
Precondition:
Pool ID must be less than maximum allowed value. PROC_attach has been successful.
Postcondition:
None.
See also:
POOL_close () ============================================================================
DLLEXPORT DSP_STATUS POOL_close ( IN PoolId  poolId )

This function closes a specific pool whose pool id is provided.

============================================================================

Function:
POOL_close
Parameters:
poolIdPool Identification number.
Returns:
DSP_SOK Operation completed successfully. DSP_SCLOSED The final process has closed the specified POOL. DSP_EINVALIDARG Invalid argument. DSP_EMEMORY Memory error. DSP_EACCESSDENIED The POOL was not opened. DSP_EFAIL General failure.
Precondition:
Pool ID must be less than maximum allowed value. All buffers allocated using POOL_alloc have been free'd using POOL_free.
Postcondition:
None.
See also:
POOL_open () ============================================================================
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.

============================================================================

Function:
POOL_alloc
Parameters:
poolIdPool Identification number.
bufPtrLocation to receive a pointer to the allocated buffer.
sizeSize of buffer to be allocated.
Returns:
DSP_SOK Operation completed successfully. DSP_EINVALIDARG Invalid argument. DSP_EMEMORY Memory error. DSP_EFAIL General failure.
Precondition:
Pool ID must be less than maximum allowed value. bufPtr must be a valid pointer. size must be greater than 0. POOL_open has been successful.
Postcondition:
None.
See also:
POOL_free () ============================================================================
DLLEXPORT DSP_STATUS POOL_free ( IN PoolId  poolId,
IN Pvoid  buf,
IN Uint32  size 
)

This function frees a buffer into the specified pool.

============================================================================

Function:
POOL_free
Parameters:
poolIdPool Identification number.
bufPointer to the buffer to be freed.
sizeSize of buffer to be freed.
Returns:
DSP_SOK Operation completed successfully. DSP_EINVALIDARG Invalid argument. DSP_EMEMORY Memory error. DSP_EFAIL General failure.
Precondition:
Pool ID must be less than maximum allowed value. buf must be a valid pointer. size must be greater than 0. POOL_alloc has been successful.
Postcondition:
None.
See also:
POOL_alloc () ============================================================================
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.

============================================================================

Function:
POOL_translateAddr
Parameters:
poolIdPool Identification number.
dstAddrLocation to receive the translated address.
dstAddrTypeType of address to be translated to.
srcAddrAddress of the buffer to be translated.
srcAddrTypeType of address of the buffer to be translated.
Returns:
DSP_SOK Operation completed successfully. DSP_EINVALIDARG Invalid argument. DSP_ENOTFOUND Information about specified buffer was not available. DSP_EFAIL General failure.
Precondition:
Pool ID must be less than maximum allowed value. dstAddr must be a valid pointer. dstAddrType must be a valid address type. srcAddr must be a valid pointer. srcAddrType must be a valid address type.
Postcondition:
None.
See also:
None. ============================================================================
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.

============================================================================

Function:
POOL_getPoolId
Parameters:
procIdProcessor Identifier.
addrAddress of the buffer whose pool id has to be determined.
addrTypeType of address of the buffer whose pool id has to be determined.
poolIdLocation to receive pool id number.
Returns:
DSP_SOK Operation completed successfully. DSP_EINVALIDARG Invalid argument. DSP_ENOTFOUND Specified buffer was not present in any pools. DSP_EFAIL General failure.
Precondition:
addr must be a valid pointer. addrType must be a valid address type. poolId must be a valid pointer.
Postcondition:
None.
See also:
None. ============================================================================
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.

============================================================================

Function:
POOL_writeback
Parameters:
poolIdPool Identification number.
bufPointer to the buffer to be invalidated.
sizeSize of buffer to be freed.
Returns:
DSP_SOK Operation completed successfully. DSP_EINVALIDARG Invalid argument. DSP_EMEMORY Memory error. DSP_EFAIL General failure.
Precondition:
Pool ID must be less than maximum allowed value. buf must be a valid pointer. size must be greater than 0.
Postcondition:
None.
See also:
POOL_invalidate () ============================================================================
DLLEXPORT DSP_STATUS POOL_invalidate ( IN PoolId  poolId,
IN Pvoid  buf,
IN Uint32  size 
)

This function invalidates the content of the buffer.

============================================================================

Function:
POOL_invalidate
Parameters:
poolIdPool Identification number.
bufPointer to the buffer to be invalidated.
sizeSize of buffer to be freed.
Returns:
DSP_SOK Operation completed successfully. DSP_EINVALIDARG Invalid argument. DSP_EMEMORY Memory error. DSP_EFAIL General failure.
Precondition:
Pool ID must be less than maximum allowed value. buf must be a valid pointer. size must be greater than 0.
Postcondition:
None.
See also:
POOL_writeback () ============================================================================
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2011, Texas Instruments Incorporated