title: Calling a function in C file from multiple threads
body: <p>I am working with a code base with some .C files and .CPP files.</p>
  
  <p>The multiple threads in the system calls some functions in C files as the one given below.</p>
  
  <pre><code>void CalculateCrc(PWORD pwCRC, PBYTE pbyBuffer, DWORD dwBufferLen)
  {
      WORD wFCS = 0xffff;
  
      ASSERT(pbyBuffer);
      ASSERT(pwCRC);
      while(dwBufferLen--)
      {
          wFCS = (WORD)(wFCS &gt;&gt; 8) ^ tbl_FCS[(wFCS ^ *pbyBuffer++) &amp; 0xff];
      }
      wFCS ^= 0xffff; // complement
      *pwCRC = wFCS;
  }
  </code></pre>
  
  <p>For each calling thread will there be copies of arguments[pwCRC, pbyBuffer, dwBufferLen] and non-static data members of function [WORD wFCS], or will there be only a single set of data shared by all threads that will result in data corruption and make the calls from multiple threads unsafe?</p>
  
  <p>I am not a native English speaker. Forgive me if the question is not asked in a clear manner. </p>
  
  <p>Thanks for your time.</p>