Re: wininet(3/4): Set callbacks needed by OpenSSL for multithreaded use
1 Oct
2009
1 Oct
'09
7:06 a.m.
Juan Lang <juan.lang(a)gmail.com> writes:
+static HANDLE *ssl_locks; + +static unsigned long ssl_thread_id(void) +{ + return GetThreadId(GetCurrentThread()); +}
You want GetCurrentThreadId();
+static void ssl_lock_callback(int mode, int type, const char *file, int line) +{ + if (mode & CRYPTO_LOCK) + WaitForSingleObject(ssl_locks[type], INFINITE); + else + ReleaseMutex(ssl_locks[type]); +}
You should use critical sections instead, it will be faster. -- Alexandre Julliard julliard(a)winehq.org
6006
Age (days ago)
6006
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard