From: richardbarry Date: Wed, 5 Mar 2008 10:12:35 +0000 (+0000) Subject: Modified uxTaskGetStackHighWaterMark() to take a parameter for the task to be checked... X-Git-Tag: V4.8.0~52 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=51147bbf0c00e1163a899f6475e0294334b8bbb5;p=freertos Modified uxTaskGetStackHighWaterMark() to take a parameter for the task to be checked, rather than just checking the stack of the calling task. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@229 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/tasks.c b/Source/tasks.c index ed69e32ee..94640ed85 100644 --- a/Source/tasks.c +++ b/Source/tasks.c @@ -1858,9 +1858,12 @@ tskTCB *pxNewTCB; #if ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) - unsigned portBASE_TYPE uxTaskGetStackHighWaterMark( void ) + unsigned portBASE_TYPE uxTaskGetStackHighWaterMark( xTaskHandle xTask ) { - return usTaskCheckFreeStackSpace( ( unsigned portCHAR * ) pxCurrentTCB->pxStack ); + tskTCB *pxTCB; + + pxTCB = prvGetTCBFromHandle( xTask ); + return usTaskCheckFreeStackSpace( ( unsigned portCHAR * ) pxTCB->pxStack ); } #endif