File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 28722872 #define configRUN_ADDITIONAL_TESTS 0
28732873#endif
28742874
2875+ /* The following config allows infinite loop control. For example, control the
2876+ * infinite loop in idle task function when performing unit tests. */
2877+ #ifndef configCONTROL_INFINITE_LOOP
2878+ #define configCONTROL_INFINITE_LOOP ()
2879+ #endif
2880+
28752881/* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using
28762882 * dynamically allocated RAM, in which case when any task is deleted it is known
28772883 * that both the task's stack and TCB need to be freed. Sometimes the
Original file line number Diff line number Diff line change 317317 #define portDECREMENT_CRITICAL_NESTING_COUNT () ( pxCurrentTCBs[ portGET_CORE_ID() ]->uxCriticalNesting-- )
318318#endif /* #if ( ( configNUMBER_OF_CORES > 1 ) && ( portCRITICAL_NESTING_IN_TCB == 1 ) ) */
319319
320- /* Code below here allows infinite loop controlling, especially for the infinite loop
321- * in idle task function (for example when performing unit tests). */
322- #ifndef INFINITE_LOOP
323- #define INFINITE_LOOP () 1
324- #endif
325-
326320#define taskBITS_PER_BYTE ( ( size_t ) 8 )
327321
328322#if ( configNUMBER_OF_CORES > 1 )
@@ -5374,7 +5368,7 @@ void vTaskMissedYield( void )
53745368
53755369 taskYIELD ();
53765370
5377- for ( ; INFINITE_LOOP (); )
5371+ for ( ; configCONTROL_INFINITE_LOOP (); )
53785372 {
53795373 #if ( configUSE_PREEMPTION == 0 )
53805374 {
@@ -5459,7 +5453,7 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters )
54595453 }
54605454 #endif /* #if ( configNUMBER_OF_CORES > 1 ) */
54615455
5462- for ( ; INFINITE_LOOP (); )
5456+ for ( ; configCONTROL_INFINITE_LOOP (); )
54635457 {
54645458 /* See if any tasks have deleted themselves - if so then the idle task
54655459 * is responsible for freeing the deleted task's TCB and stack. */
Original file line number Diff line number Diff line change 709709 }
710710 #endif /* configUSE_DAEMON_TASK_STARTUP_HOOK */
711711
712- for ( ; ; )
712+ for ( ; configCONTROL_INFINITE_LOOP () ; )
713713 {
714714 /* Query the timers list to see if it contains any timers, and if so,
715715 * obtain the time at which the next timer will expire. */
You can’t perform that action at this time.
0 commit comments