[Lldb-commits] [PATCH] use std::atomic<> to protect variables being accessed by multiple threads
Shawn Best
sbest at blueshiftinc.com
Wed Sep 10 16:39:05 PDT 2014
There are several places where multiple threads are accessing the same variables simultaneously without any kind of protection. I propose using std::atomic<> to make it safer. I did a special build of lldb, using the google tool 'thread sanitizer' which identified many cases of multiple threads accessing the same memory. std::atomic is low overhead and does not use any locks for simple types such as int/bool.
http://reviews.llvm.org/D5302
Files:
include/lldb/Core/Communication.h
include/lldb/Core/ConnectionFileDescriptor.h
include/lldb/Target/Process.h
source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
source/lldb-log.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5302.13564.patch
Type: text/x-patch
Size: 3695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140910/4b4f5ea2/attachment.bin>
More information about the lldb-commits
mailing list