Note: This is an obsolete section of the FreeRTOS website. If you want to view these pages but cannot see the menu frame then click here. Otherwise click here to visit the main FreeRTOS website.


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) 2004-2010 Richard Barry. Copyright (C) 2010-2015 Real Time Engineers Ltd.
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 Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd..