title: How to define thread-local local static variables?
body: <p>How to define local static variables (that keeps its value between function calls) that are not shared among different threads? </p>
  
  <p>I am looking for an answer both in C and C++</p>