Renesas PTX1xxR IoT-Reader API Version 7.3.1
Renesas Software Stack for IoT-Reader Applications
Data Structures | Typedefs | Enumerations | Functions
ptxBufferPool.h File Reference
#include "ptx_Status.h"
#include "ptxOsal.h"
#include "ptxLog.h"
Include dependency graph for ptxBufferPool.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ptxBufferPool_Item
 Buffer Pool Item structure. More...
 
struct  ptxBufferPool
 Buffer Pool structure. More...
 

Typedefs

typedef enum ptxBufferPool_ItemState ptxBufferPool_ItemState_t
 
typedef struct ptxBufferPool_Item ptxBufferPool_Item_t
 Buffer Pool Item structure.
 
typedef struct ptxBufferPool ptxBufferPool_t
 Buffer Pool structure.
 

Enumerations

enum  ptxBufferPool_ItemState { ptxBufferPool_ItemState_IDLE , ptxBufferPool_ItemState_ACTIVE , ptxBufferPool_ItemState_IN_USE , ptxBufferPool_ItemState_MAX_COUNT }
 

Functions

ptxStatus_t ptxBufferPool_Init (ptxBufferPool_t *bufPool, struct ptxOsal *osAl, ptxLog_t *logCtx, size_t maxNumBuffers, size_t memSize, uint8_t logDetails)
 Initialize the buffer pool. Allocate a number of buffers.
 
ptxStatus_t ptxBufferPool_DeInit (ptxBufferPool_t *bufPool)
 De-initialize the component, release all resources.
 
ptxStatus_t ptxBufferPool_ProvideItem (ptxBufferPool_t *bufPool, ptxBufferPool_Item_t **poolItem, size_t sizeReq)
 Provide a buffer that is currently not in use. Wait for a buffer to become free if there is currently none.
 
ptxStatus_t ptxBufferPool_ClaimItem (ptxBufferPool_Item_t *poolItem)
 Claim an item to prevent it from being garbage-collected.
 
ptxStatus_t ptxBufferPool_ReleaseItem (ptxBufferPool_Item_t *poolItem)
 Release an item and allow it to be garbage-collected.
 
ptxStatus_t ptxBufferPool_ReleaseUnusedItem (ptxBufferPool_Item_t *poolItem)
 Mark an unused buffer disposable.
 
ptxStatus_t ptxBufferPool_ProvideAndClaimItem (ptxBufferPool_t *bufPool, ptxBufferPool_Item_t **poolItem, size_t sizeReq)
 Combines the two functions Provide() and Claim().
 
uint8_t * ptxBufferPool_GetBuffer (ptxBufferPool_Item_t *poolItem)
 Get the buffer.
 
size_t * ptxBufferPool_PointToLength (ptxBufferPool_Item_t *poolItem)
 Get the current buffer length pointer.
 
size_t ptxBufferPool_GetLength (ptxBufferPool_Item_t *poolItem)
 Get the buffer length.
 

Detailed Description

SPDX-License-Identifier: BSD-3-Clause

Copyright (c) 2026, Renesas Electronics Corporation and/or its affiliates

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. 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.
  3. Neither the name of Renesas 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 Renesas "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RENESAS 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.

Project : PTX1K Module : IORQ (I/O ReQuests) File : ptxBufferPool.h

Description :