Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7679 Discussions

Thread-local storage support on Windows

Inge_H_
Beginner
237 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
237 Views
Inge_H_
Beginner
237 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.

jimdempseyatthecove
Black Belt
237 Views

ICC recognizes __declspec( thread ) when compiling on Windows.

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

Jim Dempsey

Reply