Home |
RTKernel-32 Programming Manual Function RTKGetMinStack |
Function RTKGetMinStackFunction RTKGetMinStack returns the least number of bytes that has been free on a task's stack since it was created: unsigned RTKGetMinStack(RTKTaskHandle Handle); ParametersHandleReferences the task whose stack to enquire. To enquire the stack of the current task, RTKGetTaskStack(RTKCurrentTaskHandle()) can be used. return valueThe least number of bytes that has been free on the task's stack since it was created. RTKernel-32 initializes the stack memory of a task with the ASCII code of the letter 'S'. RTKGetMinStack searches the stack from bottom to top for a byte not having value 'S' to determine how far the stack has been used. Depending on the system driver, RTKernel-32 may not be able to determine the stack limits of the main task. In this case, the value FFFFFFFFh is returned for it. The actual free stack space can never have this value. Note that sufficient stack space for interrupts must be available at all times.
|