title: static local CCriticalSection doesn't wok correctly
body: <p>I found the following code CCriticalSection  doesn't work correctly.</p>
  
  <pre><code>foo()
  {
      //...
      {
          static CCriticalSection cs; //static local variable
          CSingleLock lock(&amp;cs, TRUE);
          //Critical Section
          non_reentrant_function();
      }
      //...
  }
  </code></pre>
  
  <p>But these code is fine:</p>
  
  <pre><code>static CCriticalSection cs; //define a global static variable
  
  foo()
  {
      //...
      {
          CSingleLock lock(&amp;cs, TRUE);
          //Critical Section
          non_reentrant_function();
      }
      //...
  }
  </code></pre>
  
  <p>As we known, static local variable will be initialized only when the function foo  get called for the first time.</p>
  
  <p>What happens to a static local CCriticalSection, if multiple thread call foo?</p>