mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 17:48:33 -04:00
Add Stream Batching Buffer (#916)
The difference between a stream buffer and a stream batching buffer is when a task performs read on a non-empty buffer: - The task reading from a non-empty stream buffer returns immediately regardless of the amount of data in the buffer. - The task reading from a non-empty steam batching buffer blocks until the amount of data in the buffer exceeds the trigger level or the block time expires.
This commit is contained in:
parent
5a72344c9a
commit
f69b1db45c
7 changed files with 260 additions and 44 deletions
|
@ -4662,7 +4662,7 @@
|
|||
|
||||
StreamBufferHandle_t MPU_xStreamBufferGenericCreate( size_t xBufferSizeBytes,
|
||||
size_t xTriggerLevelBytes,
|
||||
BaseType_t xIsMessageBuffer,
|
||||
BaseType_t xStreamBufferType,
|
||||
StreamBufferCallbackFunction_t pxSendCompletedCallback,
|
||||
StreamBufferCallbackFunction_t pxReceiveCompletedCallback ) /* PRIVILEGED_FUNCTION */
|
||||
{
|
||||
|
@ -4686,7 +4686,7 @@
|
|||
{
|
||||
xInternalStreamBufferHandle = xStreamBufferGenericCreate( xBufferSizeBytes,
|
||||
xTriggerLevelBytes,
|
||||
xIsMessageBuffer,
|
||||
xStreamBufferType,
|
||||
NULL,
|
||||
NULL );
|
||||
|
||||
|
@ -4703,7 +4703,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer );
|
||||
traceSTREAM_BUFFER_CREATE_FAILED( xStreamBufferType );
|
||||
xExternalStreamBufferHandle = NULL;
|
||||
}
|
||||
|
||||
|
@ -4717,7 +4717,7 @@
|
|||
|
||||
StreamBufferHandle_t MPU_xStreamBufferGenericCreateStatic( size_t xBufferSizeBytes,
|
||||
size_t xTriggerLevelBytes,
|
||||
BaseType_t xIsMessageBuffer,
|
||||
BaseType_t xStreamBufferType,
|
||||
uint8_t * const pucStreamBufferStorageArea,
|
||||
StaticStreamBuffer_t * const pxStaticStreamBuffer,
|
||||
StreamBufferCallbackFunction_t pxSendCompletedCallback,
|
||||
|
@ -4743,7 +4743,7 @@
|
|||
{
|
||||
xInternalStreamBufferHandle = xStreamBufferGenericCreateStatic( xBufferSizeBytes,
|
||||
xTriggerLevelBytes,
|
||||
xIsMessageBuffer,
|
||||
xStreamBufferType,
|
||||
pucStreamBufferStorageArea,
|
||||
pxStaticStreamBuffer,
|
||||
NULL,
|
||||
|
@ -4762,7 +4762,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
traceSTREAM_BUFFER_CREATE_STATIC_FAILED( xReturn, xIsMessageBuffer );
|
||||
traceSTREAM_BUFFER_CREATE_STATIC_FAILED( xReturn, xStreamBufferType );
|
||||
xExternalStreamBufferHandle = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue