Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:47

0001 /*
0002  * Copyright 2016 Klemens D. Morgenstern
0003  * Copyright 2016 Andrey Semashev
0004  *
0005  * Distributed under the Boost Software License, Version 1.0.
0006  * See http://www.boost.org/LICENSE_1_0.txt
0007  */
0008 
0009 #ifndef BOOST_WINAPI_PRIORITY_CLASS_HPP_INCLUDED_
0010 #define BOOST_WINAPI_PRIORITY_CLASS_HPP_INCLUDED_
0011 
0012 #include <boost/winapi/basic_types.hpp>
0013 
0014 #ifdef BOOST_HAS_PRAGMA_ONCE
0015 #pragma once
0016 #endif
0017 
0018 #if BOOST_WINAPI_PARTITION_DESKTOP_SYSTEM
0019 
0020 #include <boost/winapi/detail/header.hpp>
0021 
0022 #if !defined( BOOST_USE_WINDOWS_H )
0023 extern "C" {
0024 
0025 BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
0026 GetPriorityClass(boost::winapi::HANDLE_ hProcess);
0027 
0028 BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
0029 SetPriorityClass(
0030     boost::winapi::HANDLE_ hProcess,
0031     boost::winapi::DWORD_ dwPriorityClass);
0032 
0033 } // extern "C"
0034 #endif //defined BOOST_WINDOWS_H
0035 
0036 namespace boost {
0037 namespace winapi {
0038 
0039 #if defined(BOOST_USE_WINDOWS_H)
0040 
0041 BOOST_CONSTEXPR_OR_CONST DWORD_ NORMAL_PRIORITY_CLASS_            = NORMAL_PRIORITY_CLASS;
0042 BOOST_CONSTEXPR_OR_CONST DWORD_ IDLE_PRIORITY_CLASS_              = IDLE_PRIORITY_CLASS;
0043 BOOST_CONSTEXPR_OR_CONST DWORD_ HIGH_PRIORITY_CLASS_              = HIGH_PRIORITY_CLASS;
0044 BOOST_CONSTEXPR_OR_CONST DWORD_ REALTIME_PRIORITY_CLASS_          = REALTIME_PRIORITY_CLASS;
0045 BOOST_CONSTEXPR_OR_CONST DWORD_ BELOW_NORMAL_PRIORITY_CLASS_      = BELOW_NORMAL_PRIORITY_CLASS;
0046 BOOST_CONSTEXPR_OR_CONST DWORD_ ABOVE_NORMAL_PRIORITY_CLASS_      = ABOVE_NORMAL_PRIORITY_CLASS;
0047 
0048 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
0049 BOOST_CONSTEXPR_OR_CONST DWORD_ PROCESS_MODE_BACKGROUND_BEGIN_    = PROCESS_MODE_BACKGROUND_BEGIN;
0050 BOOST_CONSTEXPR_OR_CONST DWORD_ PROCESS_MODE_BACKGROUND_END_      = PROCESS_MODE_BACKGROUND_END;
0051 #endif
0052 
0053 #else // defined( BOOST_USE_WINDOWS_H )
0054 
0055 BOOST_CONSTEXPR_OR_CONST DWORD_ NORMAL_PRIORITY_CLASS_            = 0x20;
0056 BOOST_CONSTEXPR_OR_CONST DWORD_ IDLE_PRIORITY_CLASS_              = 0x40;
0057 BOOST_CONSTEXPR_OR_CONST DWORD_ HIGH_PRIORITY_CLASS_              = 0x80;
0058 BOOST_CONSTEXPR_OR_CONST DWORD_ REALTIME_PRIORITY_CLASS_          = 0x100;
0059 BOOST_CONSTEXPR_OR_CONST DWORD_ BELOW_NORMAL_PRIORITY_CLASS_      = 0x4000;
0060 BOOST_CONSTEXPR_OR_CONST DWORD_ ABOVE_NORMAL_PRIORITY_CLASS_      = 0x8000;
0061 
0062 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
0063 BOOST_CONSTEXPR_OR_CONST DWORD_ PROCESS_MODE_BACKGROUND_BEGIN_    = 0x100000;
0064 BOOST_CONSTEXPR_OR_CONST DWORD_ PROCESS_MODE_BACKGROUND_END_      = 0x200000;
0065 #endif
0066 
0067 #endif // defined( BOOST_USE_WINDOWS_H )
0068 
0069 using ::GetPriorityClass;
0070 using ::SetPriorityClass;
0071 
0072 }
0073 }
0074 
0075 #include <boost/winapi/detail/footer.hpp>
0076 
0077 #endif // BOOST_WINAPI_PARTITION_DESKTOP_SYSTEM
0078 
0079 #endif // BOOST_WINAPI_PRIORITY_CLASS_HPP_INCLUDED_