X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=crypto%2Fthreads%2Fth-lock.c;h=553d2218de76ebec8bbf8c4441316a463bb3e804;hb=26a3a48d65c7464b400ec1de439994d7f0d25fed;hp=039022446dcb23c9bb57e4115005dde202e0fe4e;hpb=7dfb0b774e6592dcbfe47015168a0ac8b44e2a17;p=openssl.git diff --git a/crypto/threads/th-lock.c b/crypto/threads/th-lock.c index 039022446d..553d2218de 100644 --- a/crypto/threads/th-lock.c +++ b/crypto/threads/th-lock.c @@ -74,16 +74,18 @@ #include #include #endif -#include "lhash.h" -#include "crypto.h" -#include "buffer.h" -#include "e_os.h" -#include "x509.h" -#include "ssl.h" -#include "err.h" - -#ifndef NOPROTO -int CRYPTO_thread_setup(void); +#ifdef PTHREADS +#include +#endif +#include +#include +#include +#include +#include +#include +#include + +void CRYPTO_thread_setup(void); void CRYPTO_thread_cleanup(void); static void irix_locking_callback(int mode,int type,char *file,int line); @@ -95,24 +97,9 @@ static unsigned long irix_thread_id(void ); static unsigned long solaris_thread_id(void ); static unsigned long pthreads_thread_id(void ); -#else -int CRYPOTO_thread_setup(); -void CRYPTO_cleanup(); - -static void irix_locking_callback(); -static void solaris_locking_callback(); -static void win32_locking_callback(); -static void pthreads_locking_callback(); - -static unsigned long irix_thread_id(); -static unsigned long solaris_thread_id(); -static unsigned long pthreads_thread_id(); - -#endif - /* usage: * CRYPTO_thread_setup(); - * applicaion code + * application code * CRYPTO_thread_cleanup(); */ @@ -120,13 +107,14 @@ static unsigned long pthreads_thread_id(); #ifdef WIN32 -static HANDLE lock_cs[CRYPTO_NUM_LOCKS]; +static HANDLE *lock_cs; -int CRYPTO_thread_setup() +void CRYPTO_thread_setup(void) { int i; - for (i=0; i