new compiler option tlsEmulation

This commit is contained in:
Araq 2011-10-27 21:03:53 +02:00
commit 5e5e4abfee
11 changed files with 28 additions and 28 deletions

View file

@ -11,9 +11,7 @@
## thread local storage. (**Thank you Mac OS X!**)
proc emulatedThreadVars(): bool {.inline.} =
result = optThreads in gGlobalOptions
# NOW: Use the work-around everywhere, because it should be faster anyway.
#platform.OS[targetOS].props.contains(ospLacksThreadVars)
result = {optThreads, optTlsEmulation} <= gGlobalOptions
proc AccessThreadLocalVar(p: BProc, s: PSym) =
if emulatedThreadVars() and not p.ThreadVarAccessed: