[llvm-commits] [llvm] r118463 - /llvm/trunk/lib/System/DynamicLibrary.cpp
Chris Lattner
clattner at apple.com
Tue Nov 9 10:51:42 PST 2010
On Nov 9, 2010, at 9:51 AM, Owen Anderson wrote:
>
> On Nov 8, 2010, at 10:07 PM, Chris Lattner wrote:
>
>>
>> On Nov 8, 2010, at 4:36 PM, Owen Anderson wrote:
>>
>>> Author: resistor
>>> Date: Mon Nov 8 18:36:06 2010
>>> New Revision: 118463
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=118463&view=rev
>>> Log:
>>> Fix PR8441, a thread unsafe static variable in our dynamic library loading facilities.
>>
>> Hi Owen,
>>
>> Does SmartMutex<true> cause a static constructor?
>
> Yes, as does sys::Mutex. Unfortunately, we can't use ManagedStatic here because it would introduce a circular dependency (System --> Support --> System). I feel like we tried to move ManagedStatic to System at some point in the past, and that it didn't work out, but I don't remember why.
Why not just depend on threadsafe statics to handle this? Targets that don't support threadsafe statics aren't going to support threads anyway.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101109/33536220/attachment.html>
More information about the llvm-commits
mailing list