Recently I have been developing my own RTOS for ARM and PIC devices so I am analysing current RTOS concepts. I am having some doubts while studying FreeRTOS,
How is it handling function variables? How we can manage the variable inside a function?
Ex-1:
We declared a local variable 'i' in two threads with functions A and B in FreeRTOS, but variable 'i' of function A is affected by function B.
Ex-2:
We have two threads A , B and one function like delay. But both threads A and B call the same function delay
. How does FreeRTOS allocate a single delay resource to two threads (A and B)?