diff options
| author | Garrett D'Amore <garrett@damore.org> | 2021-12-05 17:28:40 -0500 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2021-12-05 17:28:40 -0500 |
| commit | eee06d1e8365ea1b1aa9363a3c6445745b002324 (patch) | |
| tree | 101363a56893db15b7aeaf90d074f8c4b438f138 /src/platform/windows/win_impl.h | |
| parent | 111b241473ceeecee1f1c232d3c9879fb850361d (diff) | |
| download | nng-eee06d1e8365ea1b1aa9363a3c6445745b002324.tar.gz nng-eee06d1e8365ea1b1aa9363a3c6445745b002324.tar.bz2 nng-eee06d1e8365ea1b1aa9363a3c6445745b002324.zip | |
Provide atomic pointer support.
This is initially used for TLS to make loading the engine pointer
faster, eliminating a much more expensive lock operation.
Diffstat (limited to 'src/platform/windows/win_impl.h')
| -rw-r--r-- | src/platform/windows/win_impl.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/platform/windows/win_impl.h b/src/platform/windows/win_impl.h index de4f8e5b..608a065e 100644 --- a/src/platform/windows/win_impl.h +++ b/src/platform/windows/win_impl.h @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -67,6 +67,10 @@ struct nni_atomic_u64 { LONGLONG v; }; +struct nni_atomic_ptr { + LONGLONG v; +}; + // nni_win_io is used with io completion ports. This allows us to get // to a specific completion callback without requiring the poller (in the // completion port) to know anything about the event itself. |
