Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Thread-local storage support on Windows

Inge_H_
Beginner
461 Views

How is the Thread-local storage support on Windows, I ask since I read the Wikipedia page on TLS and it implicitly says that the TLS __thread keyword is only for Intel C++ compilers on Linux https://en.wikipedia.org/wiki/Thread-local_storage#C.2B.2B

0 Kudos
3 Replies
jimdempseyatthecove
Black Belt
461 Views
0 Kudos
Inge_H_
Beginner
461 Views

@Jim I though TLS was compiler specific, the article you linked to is for the Visual Studio compiler, or? This question is for the ICC not the MSVC.

0 Kudos
jimdempseyatthecove
Black Belt
461 Views

ICC recognizes __declspec( thread ) when compiling on Windows.

Consider using "#define __thread __declspec( thread )" when on Windows

Jim Dempsey

0 Kudos
Reply