diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-05-10 19:39:02 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-05-10 19:39:02 +0400 |
commit | c29e693388663aaa42f041965258fa6b6bafc938 (patch) | |
tree | ab06a3773afd17d0f5c68cfa860817406fa5b670 /winsup/cygwin/wincap.cc | |
parent | 6cfbf1a573bb6fe2d0d986eeaaa0992bd9e0c176 (diff) |
* fhandler_proc.cc (format_proc_uptime): Don't call GetSystemInfo.
Fetch CPU count from wincap.
(format_proc_stat): Ditto.
* globals.cc (system_info): Move to wincap.
* heap.cc (heap_init): Fetch page size from wincap.
* syscalls.cc (getpagesize): Fetch allocation granularity from wincap.
(getsystempagesize): Fetch page size from wincap.
* wincap.cc (wincap_2003): Default is_server to false.
(wincapc::init): Call GetSystemInfo here. Always set is_server value.
* wincap.h (class wincapc): Add system_info as private member.
(wincapc::cpu_count): New public method.
(wincapc::page_size): Ditto.
(wincapc::allocation_granularity): Ditto.
Diffstat (limited to 'winsup/cygwin/wincap.cc')
-rw-r--r-- | winsup/cygwin/wincap.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index b36bc0876..aac916ba4 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -181,7 +181,7 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = { wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = { heapslop:0x4, max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE, - is_server:true, + is_server:false, has_physical_mem_access:false, has_create_global_privilege:true, has_ioctl_storage_get_media_types_ex:true, @@ -279,6 +279,7 @@ wincapc::init () if (caps) return; // already initialized + GetSystemInfo (&system_info); memset (&version, 0, sizeof version); version.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX); if (!GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&version))) @@ -347,8 +348,7 @@ wincapc::init () break; } - if (version.wProductType != VER_NT_WORKSTATION) - ((wincaps *)caps)->is_server = true; + ((wincaps *)caps)->is_server = (version.wProductType != VER_NT_WORKSTATION); if (NT_SUCCESS (NtQueryInformationProcess (NtCurrentProcess (), ProcessWow64Information, &wow64, sizeof wow64, NULL)) |