mirror of
				https://github.com/FreeRTOS/FreeRTOS-Kernel.git
				synced 2025-11-04 02:59:01 +01:00 
			
		
		
		
	Add daemon task startup hook / timer task creation consistency check (#1009)
Add a compile time check that emits a helpful error message if the user attempts to create a daemon task startup hook without also creating the timer/daemon task. The timer/daemon task startup hook runs in the context of the timer/daemon task. Therefore, it won't run even if configUSE_DAEMON_TASK_STARTUP_HOOK is set to 1 if the timer task isn't created. The timer task is only created if configUSE_TIMERS is not equal to 0.
This commit is contained in:
		
							parent
							
								
									d95451d924
								
							
						
					
					
						commit
						4732b96dba
					
				@ -298,10 +298,6 @@
 | 
			
		||||
    #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef configUSE_DAEMON_TASK_STARTUP_HOOK
 | 
			
		||||
    #define configUSE_DAEMON_TASK_STARTUP_HOOK    0
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef configUSE_APPLICATION_TASK_TAG
 | 
			
		||||
    #define configUSE_APPLICATION_TASK_TAG    0
 | 
			
		||||
#endif
 | 
			
		||||
@ -322,6 +318,16 @@
 | 
			
		||||
    #define configUSE_TIMERS    0
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef configUSE_DAEMON_TASK_STARTUP_HOOK
 | 
			
		||||
    #define configUSE_DAEMON_TASK_STARTUP_HOOK    0
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if ( configUSE_DAEMON_TASK_STARTUP_HOOK != 0 )
 | 
			
		||||
    #if ( configUSE_TIMERS == 0 )
 | 
			
		||||
        #error configUSE_DAEMON_TASK_STARTUP_HOOK is set, but the daemon task is not created because configUSE_TIMERS is 0.
 | 
			
		||||
    #endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef configUSE_COUNTING_SEMAPHORES
 | 
			
		||||
    #define configUSE_COUNTING_SEMAPHORES    0
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user