summaryrefslogtreecommitdiff
path: root/src/mongo/stdx
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/stdx')
-rw-r--r--src/mongo/stdx/SConscript11
-rw-r--r--src/mongo/stdx/thread.h2
2 files changed, 8 insertions, 5 deletions
diff --git a/src/mongo/stdx/SConscript b/src/mongo/stdx/SConscript
index 02af02ec6f3..fc70228475e 100644
--- a/src/mongo/stdx/SConscript
+++ b/src/mongo/stdx/SConscript
@@ -10,6 +10,7 @@ env.Benchmark(
'condition_variable_bm.cpp',
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
],
)
@@ -44,7 +45,7 @@ env.CppUnitTest(
'sigaltstack_location_test.cpp',
],
LIBDEPS=[
- 'stdx',
+ '$BUILD_DIR/mongo/base',
],
UNITTEST_HAS_CUSTOM_MAINLINE=True,
)
@@ -64,7 +65,7 @@ env.CppUnitTest(
'set_terminate_dispatch_test.cpp',
],
LIBDEPS=[
- 'stdx',
+ '$BUILD_DIR/mongo/base',
],
UNITTEST_HAS_CUSTOM_MAINLINE=True,
)
@@ -76,7 +77,7 @@ env.CppUnitTest(
'set_terminate_from_main_die_in_thread_test.cpp',
],
LIBDEPS=[
- 'stdx',
+ '$BUILD_DIR/mongo/base',
],
UNITTEST_HAS_CUSTOM_MAINLINE=True,
)
@@ -88,7 +89,7 @@ env.CppUnitTest(
'set_terminate_from_thread_die_in_main_test.cpp',
],
LIBDEPS=[
- 'stdx',
+ '$BUILD_DIR/mongo/base',
],
UNITTEST_HAS_CUSTOM_MAINLINE=True,
)
@@ -100,7 +101,7 @@ env.CppUnitTest(
'set_terminate_from_thread_die_in_thread_test.cpp',
],
LIBDEPS=[
- 'stdx',
+ '$BUILD_DIR/mongo/base',
],
UNITTEST_HAS_CUSTOM_MAINLINE=True,
)
diff --git a/src/mongo/stdx/thread.h b/src/mongo/stdx/thread.h
index e072de0cc72..f8058279e34 100644
--- a/src/mongo/stdx/thread.h
+++ b/src/mongo/stdx/thread.h
@@ -39,6 +39,7 @@
#include <type_traits>
#include "mongo/stdx/exception.h"
+#include "mongo/util/thread_safety_context.h"
#if defined(__linux__) || defined(__FreeBSD__)
#define MONGO_HAS_SIGALTSTACK 1
@@ -180,6 +181,7 @@ public:
::std::set_terminate( // NOLINT
::mongo::stdx::TerminateHandlerDetailsInterface::dispatch);
#endif
+ ThreadSafetyContext::getThreadSafetyContext()->onThreadCreate();
auto sigAltStackGuard = sigAltStackController.makeInstallGuard();
return std::apply(std::move(f), std::move(pack));
}) {