From bfdfe5e42dcc01a346ce157530101df6d50df234 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Fri, 14 Apr 2017 14:09:23 -0700 Subject: [PATCH] Use folly::getCurrentThreadId() in SSLContext Summary: Rather than duplicating logic (and #ifdefs), just call the helper function instead. Reviewed By: yfeldblum Differential Revision: D4888362 fbshipit-source-id: f5096f6029cf05526aa74bd40235ac8014824789 --- folly/io/async/SSLContext.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/folly/io/async/SSLContext.cpp b/folly/io/async/SSLContext.cpp index 630b34d2..5550cdbb 100644 --- a/folly/io/async/SSLContext.cpp +++ b/folly/io/async/SSLContext.cpp @@ -20,6 +20,7 @@ #include #include #include +#include // --------------------------------------------------------------------- // SSLContext implementation @@ -769,15 +770,7 @@ static void callbackLocking(int mode, int n, const char*, int) { } static unsigned long callbackThreadID() { - return static_cast( -#ifdef __APPLE__ - pthread_mach_thread_np(pthread_self()) -#elif _MSC_VER - pthread_getw32threadid_np(pthread_self()) -#else - pthread_self() -#endif - ); + return static_cast(folly::getCurrentThreadID()); } static CRYPTO_dynlock_value* dyn_create(const char*, int) { -- 2.34.1