diff options
Diffstat (limited to 'source/kit/threads_tls_callback.win32.cpp')
-rw-r--r-- | source/kit/threads_tls_callback.win32.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/kit/threads_tls_callback.win32.cpp b/source/kit/threads_tls_callback.win32.cpp new file mode 100644 index 0000000..3cc3cc6 --- /dev/null +++ b/source/kit/threads_tls_callback.win32.cpp @@ -0,0 +1,21 @@ +/* + * Copyright 2022 Yonggang Luo + * SPDX-License-Identifier: MIT + */ + +#ifndef KIT_DISABLE_SYSTEM_THREADS +# if defined(_WIN32) && !defined(__CYGWIN__) + +# include "threads.win32.h" + +struct tls_callback { + tls_callback() { } + ~tls_callback() { + __threads_win32_tls_callback(); + } +}; + +static thread_local tls_callback tls_callback_instance; + +# endif +#endif |