RtndFreeRxFrameDataBuffers
RtndFreeRxFrameDataBuffers frees a set of receive frame data buffers previously allocated by RtndAllocateRxFrameDataBuffer.
Syntax
BOOL RtndFreeRxFrameDataBuffers(
[in] ULONG_PTR RtndInterfaceId,
[in] ULONG RxQueueIndex,
[in] RTND_BUFFER_HEADER *pBufferHeader
);
Parameters
[in] RtndInterfaceId
A number or pointer returned by RtndManageInterface, used to identify the interface
[in] TxQueueIndex
An index of the Receive Queue.
[in] pBufferHeader
A head of a linked list of the buffer headers associated with the frame data buffers to free.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. To get extended error information, call GetLastError.
Remarks
This function is called by the NL2 from within the RTND_CALLBACKS.DestroyRxBuffers callback function.
The NL2 guarantees that the passed linked list of buffer headers contains exactly the same elements as the one passed in a previous call to RtndAllocateRxFrameDataBuffers, in the same order. The NL2 knows which buffer belongs to which set, and frees buffers by sets rather than individually.
The driver can retrieve the addresses of the different memory blocks that compose the set by looking at the buffer headers. In general, a driver will always allocate its buffers the same way (either as a single block or as one block per buffer), so the driver should be able to free the buffers. If necessary, the driver can use the DriverTag field of the buffer headers to store information about how to free the buffers. For example, the driver could set DriverTag to 1 for buffers which are the first of their block, and 0 for the others.
Characteristics
Real-time requirements | ||
Deterministic behavior |
Not required |
|
Local memory allocation/deallocation restrictions | ||
Process |
External MSpace |
Internal MSpace |
System |
Not allowed |
Not allowed |
Process |
Allowed |
Not allowed |
Contiguous memory allocation/deallocation restrictions | ||
Contiguous memory |
Allowed |
Requirements
Minimum supported version | Header |
---|---|
eRTOS 1.0 SDK |
Rtnd.h |
See Also: