Modified uxTaskGetStackHighWaterMark() to take a parameter for the task to be checked, rather than just checking the stack of the calling task.

This commit is contained in:
Richard Barry 2008-03-05 10:12:35 +00:00
parent 6e59817356
commit 47a7f0165b

View file

@ -1858,9 +1858,12 @@ tskTCB *pxNewTCB;
#if ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) #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 #endif