[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

2018-05-11 Thread Frederic Riss via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332115: Add a lock to PlatformPOSIX::DoLoadImage (authored by friss, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D46733?vs=146268&id=146368

[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

2018-05-11 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. Much better. https://reviews.llvm.org/D46733 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

2018-05-10 Thread Jim Ingham via Phabricator via lldb-commits
jingham accepted this revision. jingham added a comment. That looks fine to me. https://reviews.llvm.org/D46733 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

2018-05-10 Thread Frederic Riss via Phabricator via lldb-commits
friss updated this revision to Diff 146268. friss added a comment. I heted the idea of hosting the once_flag in Process but using it in PlatformPOSIX. I did a bigger refactoring where platforms pass a factory lambda to the accessor and the thread-safe init is done in the Process class itself using

[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

2018-05-10 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: source/Plugins/Platform/POSIX/PlatformPOSIX.cpp:1047 +static std::mutex do_dlopen_mutex; +std::lock_guard lock(do_dlopen_mutex); + Accessor would be fine. The other reason for putting this in the process is mul

[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

2018-05-10 Thread Frederic Riss via Phabricator via lldb-commits
friss added inline comments. Comment at: source/Plugins/Platform/POSIX/PlatformPOSIX.cpp:1046-1047 + { +static std::mutex do_dlopen_mutex; +std::lock_guard lock(do_dlopen_mutex); + clayborg wrote: > We should put the mutex, or better yet a std::once_flag

[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

2018-05-10 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision. clayborg added inline comments. This revision now requires changes to proceed. Comment at: source/Plugins/Platform/POSIX/PlatformPOSIX.cpp:1046-1047 + { +static std::mutex do_dlopen_mutex; +std::lock_guard lock(do_dlopen_mutex

[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

2018-05-10 Thread Frederic Riss via Phabricator via lldb-commits
friss created this revision. friss added a reviewer: jingham. Herald added a subscriber: emaste. Multiple threads could be calling into DoLoadImage concurrently, only one should be allowed to create the UtilityFunction. https://reviews.llvm.org/D46733 Files: source/Plugins/Platform/POSIX/Plat