CLA: trivial
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11337)
(cherry picked from commit
7da7b27eec58d1efc7012f002c45ddbdd61a5e79)
int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock)
{
- *ret = InterlockedExchangeAdd(val, amount) + amount;
+ *ret = (int)InterlockedExchangeAdd((long volatile *)val, (long)amount) + amount;
return 1;
}