| 2450 | #if ( INCLUDE_vTaskSuspend == 1 ) |
| 2451 | |
| 2452 | static BaseType_t prvTaskIsTaskSuspended( const TaskHandle_t xTask ) |
| 2453 | { |
| 2454 | BaseType_t xReturn = pdFALSE; |
| 2455 | const TCB_t * const pxTCB = xTask; |
| 2456 | |
| 2457 | /* Accesses xPendingReadyList so must be called from a critical section. */ |
| 2458 | |
| 2459 | /* It does not make sense to check if the calling task is suspended. */ |
| 2460 | configASSERT( xTask ); |
| 2461 | |
| 2462 | /* Is the task being resumed actually in the suspended list? */ |
| 2463 | if( listIS_CONTAINED_WITHIN( &xSuspendedTaskList, &( pxTCB->xStateListItem ) ) != pdFALSE ) |
| 2464 | { |
| 2465 | /* Has the task already been resumed from within an ISR? */ |
| 2466 | if( listIS_CONTAINED_WITHIN( &xPendingReadyList, &( pxTCB->xEventListItem ) ) == pdFALSE ) |
| 2467 | { |
| 2468 | /* Is it in the suspended list because it is in the Suspended |
| 2469 | * state, or because is is blocked with no timeout? */ |
| 2470 | if( listIS_CONTAINED_WITHIN( NULL, &( pxTCB->xEventListItem ) ) != pdFALSE ) /*lint !e961. The cast is only redundant when NULL is used. */ |
| 2471 | { |
| 2472 | xReturn = pdTRUE; |
| 2473 | } |
| 2474 | else |
| 2475 | { |
| 2476 | mtCOVERAGE_TEST_MARKER(); |
| 2477 | } |
| 2478 | } |
| 2479 | else |
| 2480 | { |
| 2481 | mtCOVERAGE_TEST_MARKER(); |
| 2482 | } |
| 2483 | } |
| 2484 | else |
| 2485 | { |
| 2486 | mtCOVERAGE_TEST_MARKER(); |
| 2487 | } |
| 2488 | |
| 2489 | return xReturn; |
| 2490 | } /*lint !e818 xTask cannot be a pointer to const because it is a typedef. */ |
| 2491 | |
| 2492 | #endif /* INCLUDE_vTaskSuspend */ |
| 2493 | /*-----------------------------------------------------------*/ |
no outgoing calls
no test coverage detected