diff options
author | Ben Caimano <ben.caimano@10gen.com> | 2020-11-17 23:45:55 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-18 01:19:32 +0000 |
commit | 1b2279ecaa64f70079ead90818639116b7a7c68a (patch) | |
tree | 6d950759a1a1211bef130993687a823e7352d2d9 /src/mongo/platform | |
parent | 9834b642f51f1c17ca07d82570b269caad4f9145 (diff) | |
download | mongo-1b2279ecaa64f70079ead90818639116b7a7c68a.tar.gz |
Revert "SERVER-52822 Introduced ThreadContext class"
This reverts commit efa320e38916e2a4fd52d808e326af11d2b7938c.
Diffstat (limited to 'src/mongo/platform')
-rw-r--r-- | src/mongo/platform/process_id.cpp | 17 | ||||
-rw-r--r-- | src/mongo/platform/process_id.h | 5 |
2 files changed, 0 insertions, 22 deletions
diff --git a/src/mongo/platform/process_id.cpp b/src/mongo/platform/process_id.cpp index b26710ae6e9..48bc0354316 100644 --- a/src/mongo/platform/process_id.cpp +++ b/src/mongo/platform/process_id.cpp @@ -37,11 +37,6 @@ #include "mongo/base/static_assert.h" -#if defined(__linux__) -#include <sys/syscall.h> -#include <sys/types.h> -#endif - namespace mongo { MONGO_STATIC_ASSERT(sizeof(NativeProcessId) == sizeof(uint32_t)); @@ -51,18 +46,10 @@ namespace { inline NativeProcessId getCurrentNativeProcessId() { return GetCurrentProcessId(); } - -inline NativeProcessId getCurrentNativeThreadId() { - return GetCurrentThreadId(); -} #else inline NativeProcessId getCurrentNativeProcessId() { return getpid(); } - -inline NativeProcessId getCurrentNativeThreadId() { - return syscall(SYS_gettid); -} #endif } // namespace @@ -70,10 +57,6 @@ ProcessId ProcessId::getCurrent() { return fromNative(getCurrentNativeProcessId()); } -ProcessId ProcessId::getCurrentThreadId() { - return fromNative(getCurrentNativeThreadId()); -} - int64_t ProcessId::asInt64() const { typedef std::numeric_limits<NativeProcessId> limits; if (limits::is_signed) diff --git a/src/mongo/platform/process_id.h b/src/mongo/platform/process_id.h index 2e2e6396de9..2e9d1f721f7 100644 --- a/src/mongo/platform/process_id.h +++ b/src/mongo/platform/process_id.h @@ -56,11 +56,6 @@ public: static ProcessId getCurrent(); /** - * Gets the thread id for the currently executing process. - */ - static ProcessId getCurrentThreadId(); - - /** * Constructs a ProcessId from a NativeProcessId. */ static inline ProcessId fromNative(NativeProcessId npid) { |