File tree 4 files changed +36
-2
lines changed
portable/GCC/ARM_CM7/r0p1
4 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 653
653
#define tracePOST_MOVED_TASK_TO_READY_STATE ( pxTCB )
654
654
#endif
655
655
656
+ #ifndef traceMOVED_TASK_TO_DELAYED_LIST
657
+ #define traceMOVED_TASK_TO_DELAYED_LIST ()
658
+ #endif
659
+
660
+ #ifndef traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST
661
+ #define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ()
662
+ #endif
663
+
656
664
#ifndef traceQUEUE_CREATE
657
665
#define traceQUEUE_CREATE ( pxNewQueue )
658
666
#endif
901
909
#define traceTASK_NOTIFY_GIVE_FROM_ISR ( uxIndexToNotify )
902
910
#endif
903
911
912
+ #ifndef traceISR_EXIT_TO_SCHEDULER
913
+ #define traceISR_EXIT_TO_SCHEDULER ()
914
+ #endif
915
+
916
+ #ifndef traceISR_EXIT
917
+ #define traceISR_EXIT ()
918
+ #endif
919
+
920
+ #ifndef traceISR_ENTER
921
+ #define traceISR_ENTER ()
922
+ #endif
923
+
904
924
#ifndef traceSTREAM_BUFFER_CREATE_FAILED
905
925
#define traceSTREAM_BUFFER_CREATE_FAILED ( xIsMessageBuffer )
906
926
#endif
Original file line number Diff line number Diff line change @@ -511,14 +511,21 @@ void xPortSysTickHandler( void )
511
511
* save and then restore the interrupt mask value as its value is already
512
512
* known. */
513
513
portDISABLE_INTERRUPTS ();
514
+ traceISR_ENTER ();
514
515
{
515
516
/* Increment the RTOS tick. */
516
517
if ( xTaskIncrementTick () != pdFALSE )
517
518
{
519
+ traceISR_EXIT_TO_SCHEDULER ();
520
+
518
521
/* A context switch is required. Context switching is performed in
519
522
* the PendSV interrupt. Pend the PendSV interrupt. */
520
523
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT ;
521
524
}
525
+ else
526
+ {
527
+ traceISR_EXIT ();
528
+ }
522
529
}
523
530
portENABLE_INTERRUPTS ();
524
531
}
Original file line number Diff line number Diff line change @@ -95,8 +95,11 @@ typedef unsigned long UBaseType_t;
95
95
96
96
#define portNVIC_INT_CTRL_REG ( *( ( volatile uint32_t * ) 0xe000ed04 ) )
97
97
#define portNVIC_PENDSVSET_BIT ( 1UL << 28UL )
98
- #define portEND_SWITCHING_ISR ( xSwitchRequired ) do { if( xSwitchRequired != pdFALSE ) portYIELD( ); } while( 0 )
99
- #define portYIELD_FROM_ISR ( x ) portEND_SWITCHING_ISR( x )
98
+ #define portEND_SWITCHING_ISR ( xSwitchRequired ) \
99
+ do { if( xSwitchRequired != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); portYIELD(); } \
100
+ else { traceISR_EXIT(); } \
101
+ } while( 0 )
102
+ #define portYIELD_FROM_ISR ( x ) portEND_SWITCHING_ISR( x )
100
103
/*-----------------------------------------------------------*/
101
104
102
105
/* Critical section management. */
Original file line number Diff line number Diff line change @@ -7577,12 +7577,14 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait,
7577
7577
{
7578
7578
/* Wake time has overflowed. Place this item in the overflow
7579
7579
* list. */
7580
+ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ();
7580
7581
vListInsert ( pxOverflowDelayedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
7581
7582
}
7582
7583
else
7583
7584
{
7584
7585
/* The wake time has not overflowed, so the current block list
7585
7586
* is used. */
7587
+ traceMOVED_TASK_TO_DELAYED_LIST ();
7586
7588
vListInsert ( pxDelayedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
7587
7589
7588
7590
/* If the task entering the blocked state was placed at the
@@ -7611,11 +7613,13 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait,
7611
7613
7612
7614
if ( xTimeToWake < xConstTickCount )
7613
7615
{
7616
+ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ();
7614
7617
/* Wake time has overflowed. Place this item in the overflow list. */
7615
7618
vListInsert ( pxOverflowDelayedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
7616
7619
}
7617
7620
else
7618
7621
{
7622
+ traceMOVED_TASK_TO_DELAYED_LIST ();
7619
7623
/* The wake time has not overflowed, so the current block list is used. */
7620
7624
vListInsert ( pxDelayedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
7621
7625
You can’t perform that action at this time.
0 commit comments