Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
crypto: use uv_thread_self()
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Sep 13, 2012
1 parent dd1b947 commit bec863b
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/node_crypto.cc
Expand Up @@ -33,17 +33,8 @@
#endif

#include <stdlib.h>

#include <errno.h>

/* Sigh. */
#ifdef _WIN32
# include <windows.h>
#else
# include <pthread.h>
#endif


#if OPENSSL_VERSION_NUMBER >= 0x10000000L
# define OPENSSL_CONST const
#else
Expand Down Expand Up @@ -94,15 +85,7 @@ static uv_rwlock_t* locks;


static void crypto_threadid_cb(CRYPTO_THREADID* tid) {
unsigned long val;

#ifdef _WIN32
val = static_cast<unsigned long>(GetCurrentThreadId());
#else
val = (unsigned long) pthread_self();
#endif

CRYPTO_THREADID_set_numeric(tid, val);
CRYPTO_THREADID_set_numeric(tid, uv_thread_self());
}


Expand Down

0 comments on commit bec863b

Please sign in to comment.