I have a doubt about function usage in multi threaded environment. Think, we have a small c file call "functiontest.c". This file contains a small function call "process".
1 2 3 4 5 6 7 8 9 10 11 12
// content of functiontest.c file
int process(int a,int b)
{
int c = (a+b) * 2;
c += 10;
return c;
}
If we try to access this "process" function in multi threaded environment will it gives correct answers to each thread?? Can you please explain this?