From 51147bbf0c00e1163a899f6475e0294334b8bbb5 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Wed, 5 Mar 2008 10:12:35 +0000 Subject: [PATCH] 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 --- Source/tasks.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.39.5