How to find out if FreeRTOS scheduler running

Hi, I have a task that should run before and after FreeRTOS scheduler is running. Before scheduler it just makes p[olling and after scheduler it uses Semaphore. What is the most simple way to query if scheduler is running? In other words if call to vTaskStartScheduler(); was made or not? I can arrange global flag: main() { FreeRTOSrunning=0; … … … FreeRTOSrunning=1; vTaskStartScheduler(); } But I wander if there is any internal flag or variable that can be used same way. Thanks.

How to find out if FreeRTOS scheduler running

See http://www.freertos.org/a00021.html#xTaskGetSchedulerState Regards.