Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:28

0001 #ifndef BOOST_CORE_DETAIL_SP_WIN32_SLEEP_HPP_INCLUDED
0002 #define BOOST_CORE_DETAIL_SP_WIN32_SLEEP_HPP_INCLUDED
0003 
0004 // MS compatible compilers support #pragma once
0005 
0006 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
0007 # pragma once
0008 #endif
0009 
0010 // boost/core/detail/sp_win32_sleep.hpp
0011 //
0012 // Declares the Win32 Sleep() function.
0013 //
0014 // Copyright 2008, 2020 Peter Dimov
0015 // Distributed under the Boost Software License, Version 1.0
0016 // https://www.boost.org/LICENSE_1_0.txt
0017 
0018 #if defined( BOOST_USE_WINDOWS_H )
0019 # include <windows.h>
0020 #endif
0021 
0022 namespace boost
0023 {
0024 namespace core
0025 {
0026 namespace detail
0027 {
0028 
0029 #if !defined( BOOST_USE_WINDOWS_H )
0030 
0031 #if defined(__clang__) && defined(__x86_64__)
0032 // clang x64 warns that __stdcall is ignored
0033 # define BOOST_CORE_SP_STDCALL
0034 #else
0035 # define BOOST_CORE_SP_STDCALL __stdcall
0036 #endif
0037 
0038 #if defined(__LP64__) // Cygwin 64
0039   extern "C" __declspec(dllimport) void BOOST_CORE_SP_STDCALL Sleep( unsigned int ms );
0040 #else
0041   extern "C" __declspec(dllimport) void BOOST_CORE_SP_STDCALL Sleep( unsigned long ms );
0042 #endif
0043 
0044 extern "C" __declspec(dllimport) int BOOST_CORE_SP_STDCALL SwitchToThread();
0045 
0046 #undef BOOST_CORE_SP_STDCALL
0047 
0048 #endif // !defined( BOOST_USE_WINDOWS_H )
0049 
0050 } // namespace detail
0051 } // namespace core
0052 } // namespace boost
0053 
0054 #endif // #ifndef BOOST_CORE_DETAIL_SP_WIN32_SLEEP_HPP_INCLUDED