peyro wrote on Wednesday, April 15, 2009:
Hello,
I am new with FreeRtos and would like to ask maybe a basic question. Suppose I have a global routine:
void global_function(unsigned char parameter){
unsigned char var1;
var1=parameter+1;
}
And two threads, pThread1 and pThread2. Lets suppose that Thread1 just called global_function and is about to execute statement "var1=parameter+1" but is switched to Thread2 by the kernel at this time. Thread2 also calls the function global_function and is able to execute it completed.
Question is when control is given back to Thread1, it will start from the point where it was interrupted, will it have parameter and var1 in the same value it has before interrupted??? if so where these value were stored (on particular Thread1 stack?)
Thanks in advance for any information and help
peyro