diff options
author | Ivan Zhakov <ivan@apache.org> | 2019-05-19 17:23:14 +0000 |
---|---|---|
committer | Ivan Zhakov <ivan@apache.org> | 2019-05-19 17:23:14 +0000 |
commit | 3d69b20b8d05dff833cb192002066df6acfdd7c3 (patch) | |
tree | 4b4ca5431b3b66b50679dcaa07dc1142c0c571e9 /include/arch | |
parent | f72b4a217f23b77ace61209a9b1f4ed97664f377 (diff) | |
download | apr-3d69b20b8d05dff833cb192002066df6acfdd7c3.tar.gz |
Use native one-time initialization [1] to implement apr_thread_once_t on
Windows.
This also fixes problem that apr_thread_once() may return before the other
read completes initialization on Windows.
[1] https://docs.microsoft.com/en-gb/windows/desktop/Sync/one-time-initialization
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859517 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/arch')
-rw-r--r-- | include/arch/win32/apr_arch_threadproc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/arch/win32/apr_arch_threadproc.h b/include/arch/win32/apr_arch_threadproc.h index d3ce9c518..9aee660fd 100644 --- a/include/arch/win32/apr_arch_threadproc.h +++ b/include/arch/win32/apr_arch_threadproc.h @@ -65,7 +65,7 @@ struct apr_procattr_t { }; struct apr_thread_once_t { - long value; + INIT_ONCE once; }; extern apr_status_t apr_threadproc_init(apr_pool_t *pool); |