[Lldb-commits] [PATCH] D30702: Fix remaining threading issues in Log.h

Eugene Zemtsov via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 7 13:41:46 PST 2017


eugene added inline comments.


================
Comment at: include/lldb/Utility/Log.h:152
 
-  Flags &GetOptions();
+  const Flags GetOptions() const;
 
----------------
Seems like const on return value is not really needed.


================
Comment at: include/lldb/Utility/Log.h:163
+  std::atomic<uint32_t> m_options{0};
+  std::atomic<uint32_t> m_mask{0};
+
----------------
Do we actually need atomics here? 

It seems like the stream itself is protected by the mutex, and It doesn't seem to affect performance.
Can we use the same (or a different) mutex to protect flags and options?


https://reviews.llvm.org/D30702





More information about the lldb-commits mailing list