How to define local static variables (that keeps its value between function calls) that are not shared among different threads?
I am looking for an answer both in C and C++
on Windows using Windows API: TlsAlloc()/TlsSetValue()/TlsGetValue()
on Windows using compiler intrinsic: use _declspec(thread)
on Linux (other POSIX???) : get_thread_area() and related
1.4m articles
1.4m replys
5 comments
57.0k users