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:05 +0000 (15:43 -0500)
commit349d1cfddcfa33d352240582a3803f2eba39d9a0
tree8e0aeb46efc1331208bcd5f14df216bd0b6a008e
parentaf5883fec95eb8c79c379b09885440a0d88b2d38
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)
crypto/threads_win.c