Question about threads which share a function



I have a function defined as void foo(int* pIn, int* pOut). The function gets some data via pointer pIn and calculates some output data which is
written to the array pointed to by pOut. In the calculation of the output, some local variables defined in foo are used.

If I have two or more threads executing and these threads use foo, are there any risks
that something might go wrong; like the output being screwed up and
deviating from what is expected?

Thanks


.