mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-08 07:07:47 -04:00
Add xQueueOverwriteFromISR() and update the QueueOverwrite.c to demonstrate its use.
This commit is contained in:
parent
671949ad78
commit
3b02b4c8f8
5 changed files with 165 additions and 13 deletions
|
@ -939,6 +939,7 @@ xQUEUE *pxQueue;
|
|||
pxQueue = ( xQUEUE * ) xQueue;
|
||||
configASSERT( pxQueue );
|
||||
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( unsigned portBASE_TYPE ) 0U ) ) );
|
||||
configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
|
||||
|
||||
/* Similar to xQueueGenericSend, except we don't block if there is no room
|
||||
in the queue. Also we don't directly wake a task that was blocked on a
|
||||
|
@ -947,7 +948,7 @@ xQUEUE *pxQueue;
|
|||
by this post). */
|
||||
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
|
||||
{
|
||||
if( pxQueue->uxMessagesWaiting < pxQueue->uxLength )
|
||||
if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
|
||||
{
|
||||
traceQUEUE_SEND_FROM_ISR( pxQueue );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue