]> git.sur5r.net Git - freertos/commitdiff
Modified uxTaskGetStackHighWaterMark() to take a parameter for the task to be checked...
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 5 Mar 2008 10:12:35 +0000 (10:12 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 5 Mar 2008 10:12:35 +0000 (10:12 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@229 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/tasks.c

index ed69e32eed97eaa279fe102c0e4c6e82ebb4e32b..94640ed85a810cd472e17eb583197aae85b22e09 100644 (file)
@@ -1858,9 +1858,12 @@ tskTCB *pxNewTCB;
 \r
 #if ( INCLUDE_uxTaskGetStackHighWaterMark == 1 )\r
 \r
-       unsigned portBASE_TYPE uxTaskGetStackHighWaterMark( void )\r
+       unsigned portBASE_TYPE uxTaskGetStackHighWaterMark( xTaskHandle xTask )\r
        {\r
-               return usTaskCheckFreeStackSpace( ( unsigned portCHAR * ) pxCurrentTCB->pxStack );\r
+       tskTCB *pxTCB;\r
+\r
+               pxTCB = prvGetTCBFromHandle( xTask );\r
+               return usTaskCheckFreeStackSpace( ( unsigned portCHAR * ) pxTCB->pxStack );\r
        }\r
 \r
 #endif\r