title: Do i need a mutex for a static function?
body: <p>I have a C++ class with a static function: </p>
  
  <pre><code>class Foo
  {
  public:
      static void bar(int &amp;a)
      {
          a++;
      }
  }
  </code></pre>
  
  <p><strong>EDIT:</strong><br>
  The variable passed as argument is only used within the calling scope. So it is not accessed by another thread.</p>
  
  <p>Do i have to use a <code>mutex</code> when i call this function from a seperate thread?</p>
  
  <p>Thanks.</p>