blob: 93a5eeb11c8fad39dc461b1431c38cb29e13a1af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
// system.hpp --------------------------------------------------------------//
// Copyright 2010 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Copyright 2015 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_DETAIL_WINAPI_SYSTEM_HPP
#define BOOST_DETAIL_WINAPI_SYSTEM_HPP
#include <boost/detail/winapi/basic_types.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
struct _SYSTEM_INFO;
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
GetSystemInfo(::_SYSTEM_INFO* lpSystemInfo);
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
GetNativeSystemInfo(::_SYSTEM_INFO* lpSystemInfo);
#endif
}
#endif
namespace boost {
namespace detail {
namespace winapi {
typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SYSTEM_INFO {
union {
DWORD_ dwOemId;
struct {
WORD_ wProcessorArchitecture;
WORD_ wReserved;
} DUMMYSTRUCTNAME;
} DUMMYUNIONNAME;
DWORD_ dwPageSize;
LPVOID_ lpMinimumApplicationAddress;
LPVOID_ lpMaximumApplicationAddress;
DWORD_PTR_ dwActiveProcessorMask;
DWORD_ dwNumberOfProcessors;
DWORD_ dwProcessorType;
DWORD_ dwAllocationGranularity;
WORD_ wProcessorLevel;
WORD_ wProcessorRevision;
} SYSTEM_INFO_, *LPSYSTEM_INFO_;
BOOST_FORCEINLINE VOID_ GetSystemInfo(LPSYSTEM_INFO_ lpSystemInfo)
{
::GetSystemInfo(reinterpret_cast< ::_SYSTEM_INFO* >(lpSystemInfo));
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
BOOST_FORCEINLINE VOID_ GetNativeSystemInfo(LPSYSTEM_INFO_ lpSystemInfo)
{
::GetNativeSystemInfo(reinterpret_cast< ::_SYSTEM_INFO* >(lpSystemInfo));
}
#endif
}
}
}
#endif // BOOST_DETAIL_WINAPI_SYSTEM_HPP
|