/* * Copyright 2016 Klemens D. Morgenstern * Copyright 2016 Andrey Semashev * * Distributed under the Boost Software License, Version 1.0. * See http://www.boost.org/LICENSE_1_0.txt */ #ifndef ACTIV_BOOST_WINAPI_PRIORITY_CLASS_HPP_INCLUDED_ #define ACTIV_BOOST_WINAPI_PRIORITY_CLASS_HPP_INCLUDED_ #include #ifdef ACTIV_BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if ACTIV_BOOST_WINAPI_PARTITION_DESKTOP_SYSTEM #include #if !defined( ACTIV_BOOST_USE_WINDOWS_H ) extern "C" { ACTIV_BOOST_WINAPI_IMPORT Boost::winapi::DWORD_ ACTIV_BOOST_WINAPI_WINAPI_CC GetPriorityClass(Boost::winapi::HANDLE_ hProcess); ACTIV_BOOST_WINAPI_IMPORT Boost::winapi::BOOL_ ACTIV_BOOST_WINAPI_WINAPI_CC SetPriorityClass( Boost::winapi::HANDLE_ hProcess, Boost::winapi::DWORD_ dwPriorityClass); } // extern "C" #endif //defined ACTIV_BOOST_WINDOWS_H namespace Boost { namespace winapi { #if defined(ACTIV_BOOST_USE_WINDOWS_H) ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ NORMAL_PRIORITY_CLASS_ = NORMAL_PRIORITY_CLASS; ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ IDLE_PRIORITY_CLASS_ = IDLE_PRIORITY_CLASS; ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ HIGH_PRIORITY_CLASS_ = HIGH_PRIORITY_CLASS; ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ REALTIME_PRIORITY_CLASS_ = REALTIME_PRIORITY_CLASS; ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ BELOW_NORMAL_PRIORITY_CLASS_ = BELOW_NORMAL_PRIORITY_CLASS; ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ ABOVE_NORMAL_PRIORITY_CLASS_ = ABOVE_NORMAL_PRIORITY_CLASS; #if ACTIV_BOOST_USE_WINAPI_VERSION >= ACTIV_BOOST_WINAPI_VERSION_WIN6 ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ PROCESS_MODE_BACKGROUND_BEGIN_ = PROCESS_MODE_BACKGROUND_BEGIN; ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ PROCESS_MODE_BACKGROUND_END_ = PROCESS_MODE_BACKGROUND_END; #endif #else // defined( ACTIV_BOOST_USE_WINDOWS_H ) ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ NORMAL_PRIORITY_CLASS_ = 0x20; ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ IDLE_PRIORITY_CLASS_ = 0x40; ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ HIGH_PRIORITY_CLASS_ = 0x80; ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ REALTIME_PRIORITY_CLASS_ = 0x100; ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ BELOW_NORMAL_PRIORITY_CLASS_ = 0x4000; ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ ABOVE_NORMAL_PRIORITY_CLASS_ = 0x8000; #if ACTIV_BOOST_USE_WINAPI_VERSION >= ACTIV_BOOST_WINAPI_VERSION_WIN6 ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ PROCESS_MODE_BACKGROUND_BEGIN_ = 0x100000; ACTIV_BOOST_CONSTEXPR_OR_CONST DWORD_ PROCESS_MODE_BACKGROUND_END_ = 0x200000; #endif #endif // defined( ACTIV_BOOST_USE_WINDOWS_H ) using ::GetPriorityClass; using ::SetPriorityClass; } } #include #endif // ACTIV_BOOST_WINAPI_PARTITION_DESKTOP_SYSTEM #endif // ACTIV_BOOST_WINAPI_PRIORITY_CLASS_HPP_INCLUDED_