From a8a1ea3b9367adb6d0b65a7da21fed89598ea093 Mon Sep 17 00:00:00 2001 From: Andrew Morrow Date: Sun, 26 Feb 2017 15:15:08 -0500 Subject: SERVER-26538 SERVER-26539 Detach from boost::thread Also, use thread_local everywhere for our thread specific data needs and remove the legacy support. --- src/mongo/util/signal_handlers_synchronous.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/mongo/util/signal_handlers_synchronous.cpp') diff --git a/src/mongo/util/signal_handlers_synchronous.cpp b/src/mongo/util/signal_handlers_synchronous.cpp index 8107143ef55..2331190fabc 100644 --- a/src/mongo/util/signal_handlers_synchronous.cpp +++ b/src/mongo/util/signal_handlers_synchronous.cpp @@ -48,7 +48,6 @@ #include "mongo/platform/compiler.h" #include "mongo/stdx/thread.h" #include "mongo/util/concurrency/thread_name.h" -#include "mongo/util/concurrency/threadlocal.h" #include "mongo/util/debug_util.h" #include "mongo/util/debugger.h" #include "mongo/util/exception_filter_win32.h" @@ -156,12 +155,12 @@ public: private: static stdx::mutex _streamMutex; - static MONGO_TRIVIALLY_CONSTRUCTIBLE_THREAD_LOCAL int terminateDepth; + static thread_local int terminateDepth; stdx::unique_lock _lk; }; + stdx::mutex MallocFreeOStreamGuard::_streamMutex; -MONGO_TRIVIALLY_CONSTRUCTIBLE_THREAD_LOCAL -int MallocFreeOStreamGuard::terminateDepth = 0; +thread_local int MallocFreeOStreamGuard::terminateDepth = 0; // must hold MallocFreeOStreamGuard to call void writeMallocFreeStreamToLog() { -- cgit v1.2.1