Commit bfdfe5e4 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

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
parent 9b2f7afe
......@@ -20,6 +20,7 @@
#include <folly/Memory.h>
#include <folly/Random.h>
#include <folly/SpinLock.h>
#include <folly/ThreadId.h>
// ---------------------------------------------------------------------
// SSLContext implementation
......@@ -769,15 +770,7 @@ static void callbackLocking(int mode, int n, const char*, int) {
}
static unsigned long callbackThreadID() {
return static_cast<unsigned long>(
#ifdef __APPLE__
pthread_mach_thread_np(pthread_self())
#elif _MSC_VER
pthread_getw32threadid_np(pthread_self())
#else
pthread_self()
#endif
);
return static_cast<unsigned long>(folly::getCurrentThreadID());
}
static CRYPTO_dynlock_value* dyn_create(const char*, int) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment