Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:02:28

0001 /*
0002  * Copyright 2013 Andrey Semashev
0003  *
0004  * Distributed under the Boost Software License, Version 1.0.
0005  * See http://www.boost.org/LICENSE_1_0.txt
0006  */
0007 
0008 #ifndef BOOST_WINAPI_TLS_HPP_INCLUDED_
0009 #define BOOST_WINAPI_TLS_HPP_INCLUDED_
0010 
0011 #include <boost/winapi/basic_types.hpp>
0012 
0013 #ifdef BOOST_HAS_PRAGMA_ONCE
0014 #pragma once
0015 #endif
0016 
0017 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
0018 
0019 #include <boost/winapi/detail/header.hpp>
0020 
0021 #if !defined( BOOST_USE_WINDOWS_H )
0022 extern "C" {
0023 #if !defined( UNDER_CE )
0024 // Windows CE define TlsAlloc and TlsFree as inline functions in kfuncs.h
0025 BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
0026 TlsAlloc(BOOST_WINAPI_DETAIL_VOID);
0027 
0028 BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
0029 TlsFree(boost::winapi::DWORD_ dwTlsIndex);
0030 #endif
0031 
0032 BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::LPVOID_ BOOST_WINAPI_WINAPI_CC
0033 TlsGetValue(boost::winapi::DWORD_ dwTlsIndex);
0034 
0035 BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
0036 TlsSetValue(
0037     boost::winapi::DWORD_ dwTlsIndex,
0038     boost::winapi::LPVOID_ lpTlsValue);
0039 } // extern "C"
0040 #endif
0041 
0042 namespace boost {
0043 namespace winapi {
0044 
0045 using ::TlsAlloc;
0046 using ::TlsFree;
0047 using ::TlsGetValue;
0048 using ::TlsSetValue;
0049 
0050 #if defined( BOOST_USE_WINDOWS_H )
0051 BOOST_CONSTEXPR_OR_CONST DWORD_ TLS_OUT_OF_INDEXES_ = TLS_OUT_OF_INDEXES;
0052 #else
0053 BOOST_CONSTEXPR_OR_CONST DWORD_ TLS_OUT_OF_INDEXES_ = 0xFFFFFFFF;
0054 #endif
0055 
0056 BOOST_CONSTEXPR_OR_CONST DWORD_ tls_out_of_indexes = TLS_OUT_OF_INDEXES_;
0057 
0058 }
0059 }
0060 
0061 #include <boost/winapi/detail/footer.hpp>
0062 
0063 #endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
0064 #endif // BOOST_WINAPI_TLS_HPP_INCLUDED_