File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed
Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 551551 ListItem_t * pxNext ;
552552 ListItem_t const * pxListEnd ;
553553 List_t const * pxList ;
554- EventBits_t uxBitsToClear = 0 , uxBitsWaitedFor , uxControlBits ;
554+ EventBits_t uxBitsToClear = 0 , uxBitsWaitedFor , uxControlBits , uxReturnBits ;
555555 EventGroup_t * pxEventBits = xEventGroup ;
556556 BaseType_t xMatchFound = pdFALSE ;
557557
635635 /* Clear any bits that matched when the eventCLEAR_EVENTS_ON_EXIT_BIT
636636 * bit was set in the control word. */
637637 pxEventBits -> uxEventBits &= ~uxBitsToClear ;
638+
639+ /* Snapshot resulting bits. */
640+ uxReturnBits = pxEventBits -> uxEventBits ;
638641 }
639642 ( void ) xTaskResumeAll ();
640643
641- traceRETURN_xEventGroupSetBits ( pxEventBits -> uxEventBits );
644+ traceRETURN_xEventGroupSetBits ( uxReturnBits );
642645
643- return pxEventBits -> uxEventBits ;
646+ return uxReturnBits ;
644647 }
645648/*-----------------------------------------------------------*/
646649
Original file line number Diff line number Diff line change @@ -483,14 +483,11 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
483483 * and bit 0 set uxBitsToSet to 0x09.
484484 *
485485 * @return The value of the event group at the time the call to
486- * xEventGroupSetBits() returns. There are two reasons why the returned value
487- * might have the bits specified by the uxBitsToSet parameter cleared. First,
488- * if setting a bit results in a task that was waiting for the bit leaving the
489- * blocked state then it is possible the bit will be cleared automatically
490- * (see the xClearBitOnExit parameter of xEventGroupWaitBits()). Second, any
491- * unblocked (or otherwise Ready state) task that has a priority above that of
492- * the task that called xEventGroupSetBits() will execute and may change the
493- * event group value before the call to xEventGroupSetBits() returns.
486+ * xEventGroupSetBits() returns. Returned value might have the bits specified
487+ * by the uxBitsToSet parameter cleared if setting a bit results in a task
488+ * that was waiting for the bit leaving the blocked state then it is possible
489+ * the bit will be cleared automatically (see the xClearBitOnExit parameter
490+ * of xEventGroupWaitBits()).
494491 *
495492 * Example usage:
496493 * @code{c}
You can’t perform that action at this time.
0 commit comments