summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/wincap.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-08-13 17:59:47 +0200
committerCorinna Vinschen <corinna@vinschen.de>2015-08-13 17:59:47 +0200
commite0d48debedfa27a7a31dd1caf8e23cf71708cf4c (patch)
tree5f43d76fff8eb4702206638a24486e18aa7032f6 /winsup/cygwin/wincap.cc
parent1e15b467379bccd7a2810dc786fdd23cc056da06 (diff)
downloadcygnal-e0d48debedfa27a7a31dd1caf8e23cf71708cf4c.tar.gz
cygnal-e0d48debedfa27a7a31dd1caf8e23cf71708cf4c.tar.bz2
cygnal-e0d48debedfa27a7a31dd1caf8e23cf71708cf4c.zip
Fix /proc/cpuinfo topology and cache size info
* autoload.cc (GetLogicalProcessorInformationEx): Import. (SetThreadGroupAffinity): Import. * fhandler_proc.cc (add_size): New macro. (get_msb): New inline function. (mask_bits): Ditto. (format_proc_cpuinfo): Drop handling of old CPUs. Check if we're running on a OS version supporting porcessor groups. If so, use SetThreadGroupAffinity to set thread affinity. Improve cache info to include 3rd level cache on Intel CPUs. Improve multi core info. * wincap.h (wincaps::has_processor_groups): New element. * wincap.cc: Implement above element throughout. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/wincap.cc')
-rw-r--r--winsup/cygwin/wincap.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
index 78baa6824..92d47d367 100644
--- a/winsup/cygwin/wincap.cc
+++ b/winsup/cygwin/wincap.cc
@@ -49,6 +49,7 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_microsoft_accounts:false,
has_set_thread_stack_guarantee:false,
has_broken_rtl_query_process_debug_information:false,
+ has_processor_groups:false,
};
wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -80,6 +81,7 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_microsoft_accounts:false,
has_set_thread_stack_guarantee:true,
has_broken_rtl_query_process_debug_information:true,
+ has_processor_groups:false,
};
wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -111,6 +113,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
has_microsoft_accounts:false,
has_set_thread_stack_guarantee:true,
has_broken_rtl_query_process_debug_information:false,
+ has_processor_groups:false,
};
wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -142,6 +145,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_microsoft_accounts:false,
has_set_thread_stack_guarantee:true,
has_broken_rtl_query_process_debug_information:false,
+ has_processor_groups:true,
};
wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -173,6 +177,7 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_microsoft_accounts:true,
has_set_thread_stack_guarantee:true,
has_broken_rtl_query_process_debug_information:false,
+ has_processor_groups:true,
};
wincaps wincap_10 __attribute__((section (".cygwin_dll_common"), shared)) = {
@@ -204,6 +209,7 @@ wincaps wincap_10 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_microsoft_accounts:true,
has_set_thread_stack_guarantee:true,
has_broken_rtl_query_process_debug_information:false,
+ has_processor_groups:true,
};
wincapc wincap __attribute__((section (".cygwin_dll_common"), shared));