MCPcopy Create free account
hub / github.com/FreeRTOS/FreeRTOS-Kernel / xTaskGetSchedulerState

Function xTaskGetSchedulerState

tasks.c:4942–4967  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4940#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
4941
4942 BaseType_t xTaskGetSchedulerState( void )
4943 {
4944 BaseType_t xReturn;
4945
4946 if( xSchedulerRunning == pdFALSE )
4947 {
4948 xReturn = taskSCHEDULER_NOT_STARTED;
4949 }
4950 else
4951 {
4952 taskENTER_CRITICAL();
4953 {
4954 if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
4955 {
4956 xReturn = taskSCHEDULER_RUNNING;
4957 }
4958 else
4959 {
4960 xReturn = taskSCHEDULER_SUSPENDED;
4961 }
4962 }
4963 taskEXIT_CRITICAL();
4964 }
4965
4966 return xReturn;
4967 }
4968
4969#endif /* ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) */
4970/*-----------------------------------------------------------*/

Callers 8

xQueueGenericSendFunction · 0.85
xQueueReceiveFunction · 0.85
xQueueSemaphoreTakeFunction · 0.85
xQueuePeekFunction · 0.85
xEventGroupSyncFunction · 0.85
xEventGroupWaitBitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected