VC++ 2008 or earlier x86 compilers do not have an inline implementation of Interlocke...
authorDaiyuu Nobori <dnobori.gitcommit@coe.ad.jp>
Sun, 24 Jul 2022 01:34:05 +0000 (10:34 +0900)
committerMatt Caswell <matt@openssl.org>
Fri, 12 Aug 2022 09:30:02 +0000 (10:30 +0100)
commit2d46a44ff24173d2cf5ea2196360cb79470d49c7
tree0845cf6d15630149b7e0392b68d157b72be1ce8c
parent56d4ff6cd7fc200943197dff65146a8864b7df98
VC++ 2008 or earlier x86 compilers do not have an inline implementation of InterlockedOr64 for 32bit and will fail to run on Windows XP 32bit.
See: https://docs.microsoft.com/en-us/cpp/intrinsics/interlockedor-intrinsic-functions#requirements
To work around this problem, we implement a manual locking mechanism for only VC++ 2008 or earlier x86 compilers.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18856)
crypto/threads_win.c