Skip to content

Commit 53a4490

Browse files
feat(freertos-smp): Add support for queue direct transfer
This commit adds support for direct transfer for queue operations. A ew config option configQUEUE_DIRECT_TRANSFER is introduced to enable this option. With this feature, we enable directly copying data to a waiting task's buffer and avoid copying data to the queue buffer. This helps in avoiding priority inversions where a lower priority task can steal a data from a higher priority task blocked on the queue. This also reduces a copy operation and helps with the queue performance.
1 parent 4ee7179 commit 53a4490

File tree

2 files changed

+310
-22
lines changed

2 files changed

+310
-22
lines changed

include/FreeRTOS.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3337,6 +3337,11 @@ typedef struct xSTATIC_QUEUE
33373337
#if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) )
33383338
portSPINLOCK_TYPE xDummySpinlock[ 2 ];
33393339
#endif /* #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */
3340+
3341+
#if ( configQUEUE_DIRECT_TRANSFER == 1 )
3342+
void * pvDummyDirectTransferBuffer;
3343+
BaseType_t xDummyDirectTransferPosition;
3344+
#endif
33403345
} StaticQueue_t;
33413346
typedef StaticQueue_t StaticSemaphore_t;
33423347

0 commit comments

Comments
 (0)