summaryrefslogtreecommitdiffstats
path: root/crypto/threads_win.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2017-10-09 14:39:43 +1000
committerPauli <paul.dale@oracle.com>2017-10-10 08:45:53 +1000
commit30ff41beab5d8a53cbcbdab4109b32b9ef5c0f6e (patch)
treed807a734652467cb791af4cfdfe5330080dca5d1 /crypto/threads_win.c
parent94683b7acb62a5d99b8b4d66283e6d6dd0007f7a (diff)
Add atomic write call
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4414)
Diffstat (limited to 'crypto/threads_win.c')
-rw-r--r--crypto/threads_win.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/threads_win.c b/crypto/threads_win.c
index 6f9c7b1bd3..ab2eb25740 100644
--- a/crypto/threads_win.c
+++ b/crypto/threads_win.c
@@ -139,6 +139,12 @@ int CRYPTO_atomic_read(int *val, int *ret, CRYPTO_RWLOCK *lock)
return 1;
}
+int CRYPTO_atomic_write(int *val, int n, CRYPTO_RWLOCK *lock)
+{
+ InterlockedExchange(val, n);
+ return 1;
+}
+
int openssl_init_fork_handlers(void)
{
return 0;