[PATCH] Removing the static initializer in ManagedStatic.cpp by using llvm_call_once to initialize the ManagedStatic mutex.

Aaron Ballman aaron.ballman at gmail.com
Thu Oct 23 12:04:07 PDT 2014


On Thu, Oct 23, 2014 at 1:10 PM, Reid Kleckner <rnk at google.com> wrote:
>>>! In D5922#4, @beanz wrote:
>> Fixed code comments based on Aaron's feedback.
>>
>> Aaron, I understand your point about using the Windows one-time initialization, however I'm really not the best candidate to write Windows specific code. I am much more familiar with basic threading constructs like MemFence and CompareAndSwap than Win32 APIs. Could you provide and test a Windows one-time init solution?
>
> The one time initialization APIs were added in Vista, and I don't know if we've dropped support for XP or not yet. Certainly Microsoft has. =/

Shoot, we support Windows XP still, AFAIK, so that kind of shoots that down.

> I suspect that the fence and CAS implementation has subtle issues, but I'm not a C++ memory model expert. David Majnemer has a better understanding, and he said there are issues.

That's where my concerns came in, and my limitations too. ;-)

~Aaron




More information about the llvm-commits mailing list