Homepage  

Conditional Branch to Procedure
[Software Test Details]

This operation starts by clearing a recursion count variable to zero before making the first call to a recursive function. The function increments the count variable then checks to see if the variable has reached 5.

If the variable is less than 5 the function calls itself. If the count variable equals 5 the function returns and the call stack unwinds. The variable can only be 5 if the function has recursively called itself four time, making five calls in total.

In addition to conditional branching, this operation tests the overhead of a C function call. A recursive function was necessary to prevent some compiler optimizers removing the call all together.

The operation was performed ten times within the measured period - making fifty function calls in total.




Copyright (C) 2003 - 2008 Richard Barry
Any and all data, files, source code, html content and documentation included in the FreeRTOS distribution or available on this site are the exclusive property of Richard Barry. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Richard Barry.