From ba0e6b0806cf5b254b4e23f3643d2f4fc6e0c335 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Mon, 19 May 2008 19:17:56 +0000 Subject: [PATCH] Add signed portBASE_TYPE xTaskIsTaskSuspended( xTaskHandle xTask ); Previously this was a private function. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@362 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/tasks.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Source/tasks.c b/Source/tasks.c index ade94f971..06a6a9864 100644 --- a/Source/tasks.c +++ b/Source/tasks.c @@ -403,15 +403,6 @@ static tskTCB *prvAllocateTCBAndStack( unsigned portSHORT usStackDepth ); #endif -/* - * Checks that a task being resumed (unsuspended) is actually in the Suspended - * state. - */ -#if ( INCLUDE_vTaskSuspend == 1 ) - - static portBASE_TYPE prvIsTaskSuspended( const tskTCB * const pxTCB ); - -#endif /*lint +e956 */ @@ -914,9 +905,10 @@ tskTCB * pxNewTCB; #if ( INCLUDE_vTaskSuspend == 1 ) - static portBASE_TYPE prvIsTaskSuspended( const tskTCB * const pxTCB ) + signed portBASE_TYPE xTaskIsTaskSuspended( xTaskHandle xTask ) { portBASE_TYPE xReturn = pdFALSE; + const tskTCB * const pxTCB = ( tskTCB * ) xTask; /* Is the task we are attempting to resume actually in the suspended list? */ @@ -958,7 +950,7 @@ tskTCB * pxNewTCB; { taskENTER_CRITICAL(); { - if( prvIsTaskSuspended( pxTCB ) == pdTRUE ) + if( xTaskIsTaskSuspended( pxTCB ) == pdTRUE ) { traceTASK_RESUME( pxTCB ); @@ -993,7 +985,7 @@ tskTCB * pxNewTCB; pxTCB = ( tskTCB * ) pxTaskToResume; - if( prvIsTaskSuspended( pxTCB ) == pdTRUE ) + if( xTaskIsTaskSuspended( pxTCB ) == pdTRUE ) { traceTASK_RESUME_FROM_ISR( pxTCB ); -- 2.39.5