[llvm-commits] Reworked SwitchInst prototype with case-ranges.
Nuno Lopes
nunoplopes at sapo.pt
Fri Sep 7 01:28:07 PDT 2012
Quoting Nick Lewycky <nicholas at mxc.ca>:
> Nuno Lopes wrote:
>> - Please don't use function static variables. It's not good for thread
>> safety.
>
> Excuse me? On what platform are function local statics not thread
> safe? I've been known to advocate using function local statics as
> the solution to threading problems.
As far as I understand, the initialization of these variables is
guaranteed to be thread safe by the standard, but not the access to
them. That means that doing '++counter;' is not thread safe.
Nuno
More information about the llvm-commits
mailing list