title: Function using a local static variable thread safe/reentrant
body: <p>I have a function that will generate a unique random number(basically increment previous) to different threads invoking it.</p>
  
  <p>Is this thread safe or is this reentrant.Assume I used static variable for this number.</p>
  
  <p>I have seen in this forum static variables cant be used for reentrant/thread safe.</p>
  
  <p>Does it applies for local/global static.</p>
  
  <p>Or is it implementation defined.</p>