made sure everything's thread safe
Pretty much everything already was, but I tweaked a few things to make
sure they stay that way and added various comments about that fact. Also
cleaned up a few things along the way and removed SafeMessageBuilder
because it wasn't.
diff --git a/aos/common/logging/logging_interface.cc b/aos/common/logging/logging_interface.cc
index 8c45afd..e4c6fcd 100644
--- a/aos/common/logging/logging_interface.cc
+++ b/aos/common/logging/logging_interface.cc
@@ -15,10 +15,10 @@
namespace logging {
namespace internal {
-LogImplementation *global_top_implementation(NULL);
+::std::atomic<LogImplementation *> global_top_implementation(NULL);
Context::Context()
- : implementation(global_top_implementation),
+ : implementation(global_top_implementation.load()),
sequence(0) {
cork_data.Reset();
}