From: Christopher Dykes Date: Fri, 14 Apr 2017 21:09:23 +0000 (-0700) Subject: Use folly::getCurrentThreadId() in SSLContext X-Git-Tag: v2017.04.17.00~6 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=bfdfe5e42dcc01a346ce157530101df6d50df234 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 --- 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) {