[llvm-commits] [PATCH] LockedManagedStatic
Owen Anderson
resistor at mac.com
Mon Jun 15 17:29:41 PDT 2009
Just for everyone's information, Chris and I discussed this patch
offline, and we think we have a much better version planned.
--Owen
On Jun 15, 2009, at 10:16 AM, Owen Anderson wrote:
> Here's my next proposal for the long-term goal of making LLVM thread-
> safe. The concept here is to create a new subclass of
> ManagedStaticBase, LockedManagedStatic. These objects pair a mutex
> with the object that they're guarding, and hook the mutex up to be
> initialized automatically when llvm_start_multithreaded() is called.
>
> This does have slight overhead in that it adds a pointer to
> ManagedStaticBase. This could probably be avoided by adding another
> class to the hierarch (LockedManagedStaticBase?), but that seemed
> overly complex for fairly small benefit.
>
> Comments welcome!
>
> --Owen
>
> <threading.diff>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list