Fixed deadlock in CRYPTO_THREAD_run_once for Windows
authorDK <dmitrykos@neutroncode.com>
Sun, 13 Nov 2016 12:48:15 +0000 (14:48 +0200)
committerRich Salz <rsalz@openssl.org>
Sun, 13 Nov 2016 20:43:54 +0000 (15:43 -0500)
commitedc18749bd5dfb7e12513d3978f78f9b56104fd6
tree6f1aa7e5c155f6ef65e41843ced450264eb67a12
parente2cefab06a9e1b8d9a21d030754f62dfbb199950
Fixed deadlock in CRYPTO_THREAD_run_once for Windows

Fixed deadlock in CRYPTO_THREAD_run_once() if call to init() is causing
a recursive call to CRYPTO_THREAD_run_once() again that is causing a hot
deadloop inside do { } while (result == ONCE_ININIT); section.

CLA: trivial
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1913)

(cherry picked from commit 349d1cfddcfa33d352240582a3803f2eba39d9a0)
crypto/threads_win.c