Skip to content

Commit cd10aea

Browse files
committed
Add stream buffer and stream batching buffer difference
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
1 parent e7de930 commit cd10aea

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

include/stream_buffer.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,14 @@ typedef void (* StreamBufferCallbackFunction_t)( StreamBufferHandle_t xStreamBuf
287287
* configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
288288
* xStreamBatchingBufferCreate() to be available.
289289
*
290+
* The difference between a stream buffer and a stream batching buffer is when
291+
* a task performs read on a non-empty buffer:
292+
* - The task reading from a non-empty stream buffer returns immediately
293+
* regardless of the amount of data in the buffer.
294+
* - The task reading from a non-empty steam batching buffer blocks until the
295+
* amount of data in the buffer exceeds the trigger level or the block time
296+
* expires.
297+
*
290298
* @param xBufferSizeBytes The total number of bytes the stream batching buffer
291299
* will be able to hold at any one time.
292300
*
@@ -367,6 +375,14 @@ typedef void (* StreamBufferCallbackFunction_t)( StreamBufferHandle_t xStreamBuf
367375
* must be set to 1 in for FreeRTOSConfig.h for xStreamBatchingBufferCreateStatic()
368376
* to be available.
369377
*
378+
* The difference between a stream buffer and a stream batching buffer is when
379+
* a task performs read on a non-empty buffer:
380+
* - The task reading from a non-empty stream buffer returns immediately
381+
* regardless of the amount of data in the buffer.
382+
* - The task reading from a non-empty steam batching buffer blocks until the
383+
* amount of data in the buffer exceeds the trigger level or the block time
384+
* expires.
385+
*
370386
* @param xBufferSizeBytes The size, in bytes, of the buffer pointed to by the
371387
* pucStreamBufferStorageArea parameter.
372388
*

0 commit comments

Comments
 (0)