Note that std::once can be used to enforce "run once" and we don't have to worry about each platform (like we would have to if we used pthread_once).
Modified version submitted with: Author: gclayton Date: Mon Mar 24 11:50:33 2014 New Revision: 204622 URL: http://llvm.org/viewvc/llvm-project?rev=204622&view=rev Log: Modified patch from Piotr Rak that makes GetSharedModuleList() more thread safe and also fixed a missed member initialization on the copy contractor and also makes the assignment operator safer. Modified: lldb/trunk/source/Core/ModuleList.cpp On Mar 23, 2014, at 2:28 PM, Piotr Rak <[email protected]> wrote: > Hi, > > Not 100% sure about initialization (last hunk GetSharedModuleList()), but as > I see it, it was racy, unless it is always protected by something in Target. > > Other two are minor things, with ModuleList::operator= priority inversion > probably never occurring in current code as is. However it might fight back > in future, and since I've noticed it... > > Please commit if OK for trunk. > > Cheers, > /Piotr > <Minor-lldb_private-ModuleList-fixes.diff><0001-Minor-lldb_private-ModuleList-fixes.patch>_______________________________________________ > lldb-dev mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev _______________________________________________ lldb-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
