use std::atomic<> to protect variables being accessed by multiple threads

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.

See http://reviews.llvm.org/D5302 for more details.

Change by Shawn Best.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217818 91177308-0d34-0410-b5e6-96231b3b80d8