@@ -82,6 +82,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
82
82
{
83
83
EventGroup_t * pxEventBits ;
84
84
85
+ traceENTER_xEventGroupCreateStatic ( pxEventGroupBuffer );
86
+
85
87
/* A StaticEventGroup_t object must be provided. */
86
88
configASSERT ( pxEventGroupBuffer );
87
89
@@ -122,6 +124,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
122
124
traceEVENT_GROUP_CREATE_FAILED ();
123
125
}
124
126
127
+ traceRETURN_xEventGroupCreateStatic ( pxEventBits );
128
+
125
129
return pxEventBits ;
126
130
}
127
131
@@ -134,6 +138,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
134
138
{
135
139
EventGroup_t * pxEventBits ;
136
140
141
+ traceENTER_xEventGroupCreate ();
142
+
137
143
/* Allocate the event group. Justification for MISRA deviation as
138
144
* follows: pvPortMalloc() always ensures returned memory blocks are
139
145
* aligned per the requirements of the MCU stack. In this case
@@ -170,6 +176,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
170
176
traceEVENT_GROUP_CREATE_FAILED (); /*lint !e9063 Else branch only exists to allow tracing and does not generate code if trace macros are not defined. */
171
177
}
172
178
179
+ traceRETURN_xEventGroupCreate ( pxEventBits );
180
+
173
181
return pxEventBits ;
174
182
}
175
183
@@ -186,6 +194,8 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
186
194
BaseType_t xAlreadyYielded ;
187
195
BaseType_t xTimeoutOccurred = pdFALSE ;
188
196
197
+ traceENTER_xEventGroupSync ( xEventGroup , uxBitsToSet , uxBitsToWaitFor , xTicksToWait );
198
+
189
199
configASSERT ( ( uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
190
200
configASSERT ( uxBitsToWaitFor != 0 );
191
201
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
@@ -303,6 +313,8 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
303
313
/* Prevent compiler warnings when trace macros are not used. */
304
314
( void ) xTimeoutOccurred ;
305
315
316
+ traceRETURN_xEventGroupSync ( uxReturn );
317
+
306
318
return uxReturn ;
307
319
}
308
320
/*-----------------------------------------------------------*/
@@ -318,6 +330,8 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
318
330
BaseType_t xWaitConditionMet , xAlreadyYielded ;
319
331
BaseType_t xTimeoutOccurred = pdFALSE ;
320
332
333
+ traceENTER_xEventGroupWaitBits ( xEventGroup , uxBitsToWaitFor , xClearOnExit , xWaitForAllBits , xTicksToWait );
334
+
321
335
/* Check the user is not attempting to wait on the bits used by the kernel
322
336
* itself, and that at least one bit is being requested. */
323
337
configASSERT ( xEventGroup );
@@ -467,6 +481,8 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
467
481
/* Prevent compiler warnings when trace macros are not used. */
468
482
( void ) xTimeoutOccurred ;
469
483
484
+ traceRETURN_xEventGroupWaitBits ( uxReturn );
485
+
470
486
return uxReturn ;
471
487
}
472
488
/*-----------------------------------------------------------*/
@@ -477,6 +493,8 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
477
493
EventGroup_t * pxEventBits = xEventGroup ;
478
494
EventBits_t uxReturn ;
479
495
496
+ traceENTER_xEventGroupClearBits ( xEventGroup , uxBitsToClear );
497
+
480
498
/* Check the user is not attempting to clear the bits used by the kernel
481
499
* itself. */
482
500
configASSERT ( xEventGroup );
@@ -495,6 +513,8 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
495
513
}
496
514
taskEXIT_CRITICAL ();
497
515
516
+ traceRETURN_xEventGroupClearBits ( uxReturn );
517
+
498
518
return uxReturn ;
499
519
}
500
520
/*-----------------------------------------------------------*/
@@ -506,9 +526,13 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
506
526
{
507
527
BaseType_t xReturn ;
508
528
529
+ traceENTER_xEventGroupClearBitsFromISR ( xEventGroup , uxBitsToClear );
530
+
509
531
traceEVENT_GROUP_CLEAR_BITS_FROM_ISR ( xEventGroup , uxBitsToClear );
510
532
xReturn = xTimerPendFunctionCallFromISR ( vEventGroupClearBitsCallback , ( void * ) xEventGroup , ( uint32_t ) uxBitsToClear , NULL ); /*lint !e9087 Can't avoid cast to void* as a generic callback function not specific to this use case. Callback casts back to original type so safe. */
511
533
534
+ traceRETURN_xEventGroupClearBitsFromISR ( xReturn );
535
+
512
536
return xReturn ;
513
537
}
514
538
@@ -521,12 +545,16 @@ EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup )
521
545
EventGroup_t const * const pxEventBits = xEventGroup ;
522
546
EventBits_t uxReturn ;
523
547
548
+ traceENTER_xEventGroupGetBitsFromISR ( xEventGroup );
549
+
524
550
uxSavedInterruptStatus = taskENTER_CRITICAL_FROM_ISR ();
525
551
{
526
552
uxReturn = pxEventBits -> uxEventBits ;
527
553
}
528
554
taskEXIT_CRITICAL_FROM_ISR ( uxSavedInterruptStatus );
529
555
556
+ traceRETURN_xEventGroupGetBitsFromISR ( uxReturn );
557
+
530
558
return uxReturn ;
531
559
} /*lint !e818 EventGroupHandle_t is a typedef used in other functions to so can't be pointer to const. */
532
560
/*-----------------------------------------------------------*/
@@ -542,6 +570,8 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
542
570
EventGroup_t * pxEventBits = xEventGroup ;
543
571
BaseType_t xMatchFound = pdFALSE ;
544
572
573
+ traceENTER_xEventGroupSetBits ( xEventGroup , uxBitsToSet );
574
+
545
575
/* Check the user is not attempting to set the bits used by the kernel
546
576
* itself. */
547
577
configASSERT ( xEventGroup );
@@ -623,6 +653,8 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
623
653
}
624
654
( void ) xTaskResumeAll ();
625
655
656
+ traceRETURN_xEventGroupSetBits ( pxEventBits -> uxEventBits );
657
+
626
658
return pxEventBits -> uxEventBits ;
627
659
}
628
660
/*-----------------------------------------------------------*/
@@ -632,6 +664,8 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
632
664
EventGroup_t * pxEventBits = xEventGroup ;
633
665
const List_t * pxTasksWaitingForBits ;
634
666
667
+ traceENTER_vEventGroupDelete ( xEventGroup );
668
+
635
669
configASSERT ( pxEventBits );
636
670
637
671
pxTasksWaitingForBits = & ( pxEventBits -> xTasksWaitingForBits );
@@ -670,6 +704,8 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
670
704
}
671
705
}
672
706
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
707
+
708
+ traceRETURN_vEventGroupDelete ();
673
709
}
674
710
/*-----------------------------------------------------------*/
675
711
@@ -680,6 +716,8 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
680
716
BaseType_t xReturn ;
681
717
EventGroup_t * pxEventBits = xEventGroup ;
682
718
719
+ traceENTER_xEventGroupGetStaticBuffer ( xEventGroup , ppxEventGroupBuffer );
720
+
683
721
configASSERT ( pxEventBits );
684
722
configASSERT ( ppxEventGroupBuffer );
685
723
@@ -704,6 +742,8 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
704
742
}
705
743
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
706
744
745
+ traceRETURN_xEventGroupGetStaticBuffer ( xReturn );
746
+
707
747
return xReturn ;
708
748
}
709
749
#endif /* configSUPPORT_STATIC_ALLOCATION */
@@ -714,7 +754,11 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
714
754
void vEventGroupSetBitsCallback ( void * pvEventGroup ,
715
755
const uint32_t ulBitsToSet )
716
756
{
757
+ traceENTER_vEventGroupSetBitsCallback ( pvEventGroup , ulBitsToSet );
758
+
717
759
( void ) xEventGroupSetBits ( pvEventGroup , ( EventBits_t ) ulBitsToSet ); /*lint !e9079 Can't avoid cast to void* as a generic timer callback prototype. Callback casts back to original type so safe. */
760
+
761
+ traceRETURN_vEventGroupSetBitsCallback ();
718
762
}
719
763
/*-----------------------------------------------------------*/
720
764
@@ -723,7 +767,11 @@ void vEventGroupSetBitsCallback( void * pvEventGroup,
723
767
void vEventGroupClearBitsCallback ( void * pvEventGroup ,
724
768
const uint32_t ulBitsToClear )
725
769
{
770
+ traceENTER_vEventGroupClearBitsCallback ( pvEventGroup , ulBitsToClear );
771
+
726
772
( void ) xEventGroupClearBits ( pvEventGroup , ( EventBits_t ) ulBitsToClear ); /*lint !e9079 Can't avoid cast to void* as a generic timer callback prototype. Callback casts back to original type so safe. */
773
+
774
+ traceRETURN_vEventGroupClearBitsCallback ();
727
775
}
728
776
/*-----------------------------------------------------------*/
729
777
@@ -772,9 +820,13 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
772
820
{
773
821
BaseType_t xReturn ;
774
822
823
+ traceENTER_xEventGroupSetBitsFromISR ( xEventGroup , uxBitsToSet , pxHigherPriorityTaskWoken );
824
+
775
825
traceEVENT_GROUP_SET_BITS_FROM_ISR ( xEventGroup , uxBitsToSet );
776
826
xReturn = xTimerPendFunctionCallFromISR ( vEventGroupSetBitsCallback , ( void * ) xEventGroup , ( uint32_t ) uxBitsToSet , pxHigherPriorityTaskWoken ); /*lint !e9087 Can't avoid cast to void* as a generic callback function not specific to this use case. Callback casts back to original type so safe. */
777
827
828
+ traceRETURN_xEventGroupSetBitsFromISR ( xReturn );
829
+
778
830
return xReturn ;
779
831
}
780
832
@@ -788,6 +840,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
788
840
UBaseType_t xReturn ;
789
841
EventGroup_t const * pxEventBits = ( EventGroup_t * ) xEventGroup ; /*lint !e9087 !e9079 EventGroupHandle_t is a pointer to an EventGroup_t, but EventGroupHandle_t is kept opaque outside of this file for data hiding purposes. */
790
842
843
+ traceENTER_uxEventGroupGetNumber ( xEventGroup );
844
+
791
845
if ( xEventGroup == NULL )
792
846
{
793
847
xReturn = 0 ;
@@ -797,6 +851,8 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
797
851
xReturn = pxEventBits -> uxEventGroupNumber ;
798
852
}
799
853
854
+ traceRETURN_uxEventGroupGetNumber ( xReturn );
855
+
800
856
return xReturn ;
801
857
}
802
858
@@ -808,7 +864,11 @@ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
808
864
void vEventGroupSetNumber ( void * xEventGroup ,
809
865
UBaseType_t uxEventGroupNumber )
810
866
{
867
+ traceENTER_vEventGroupSetNumber ( xEventGroup , uxEventGroupNumber );
868
+
811
869
( ( EventGroup_t * ) xEventGroup )-> uxEventGroupNumber = uxEventGroupNumber ; /*lint !e9087 !e9079 EventGroupHandle_t is a pointer to an EventGroup_t, but EventGroupHandle_t is kept opaque outside of this file for data hiding purposes. */
870
+
871
+ traceRETURN_vEventGroupSetNumber ();
812
872
}
813
873
814
874
#endif /* configUSE_TRACE_FACILITY */
0 commit comments