I do not know how other compilers handle native thread-local variables (as described in the first message), however, I doubt that they would add extra TLS and synchronization code to each exported function, when these variables are specifically never intended to be ever be shared across threads. If they are never to be shared, then there’s no danger of reading and writing to these variables from different threads (as they do not have the same memory locations), and no need for complex synchronization code to slow the functions down.
------------------
Leave a comment: