Cygwin: wincap: expose more SYSTEM_INFO members and use as appropriate

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2018-04-11 11:59:35 +02:00
parent 402d68af1a
commit 92f4e0500b
3 changed files with 10 additions and 12 deletions

View File

@@ -42,6 +42,11 @@ public:
void init ();
const DWORD cpu_count () const { return system_info.dwNumberOfProcessors; }
const DWORD_PTR cpu_mask () const { return system_info.dwActiveProcessorMask;}
const WORD cpu_arch () const { return system_info.wProcessorArchitecture; }
const WORD cpu_level () const { return system_info.wProcessorLevel; }
/* The casts to size_t make sure that the returned value has the size of
a pointer on any system. This is important when using them for bit
mask operations, like in roundup2. */