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:
Caleb Perkinson 2024-04-17 10:54:00 -04:00 committed by GitHub
parent 5a72344c9a
commit f69b1db45c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 260 additions and 44 deletions

View file

@ -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;
}