aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/wincap.h
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.h
parent1e15b467379bccd7a2810dc786fdd23cc056da06 (diff)
downloadnewlib-e0d48debedfa27a7a31dd1caf8e23cf71708cf4c.zip
newlib-e0d48debedfa27a7a31dd1caf8e23cf71708cf4c.tar.gz
newlib-e0d48debedfa27a7a31dd1caf8e23cf71708cf4c.tar.bz2
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.h')
-rw-r--r--winsup/cygwin/wincap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h
index 4058557..e4f67bc 100644
--- a/winsup/cygwin/wincap.h
+++ b/winsup/cygwin/wincap.h
@@ -42,6 +42,7 @@ struct wincaps
unsigned has_microsoft_accounts : 1;
unsigned has_set_thread_stack_guarantee : 1;
unsigned has_broken_rtl_query_process_debug_information : 1;
+ unsigned has_processor_groups : 1;
};
class wincapc
@@ -98,6 +99,7 @@ public:
bool IMPLEMENT (has_microsoft_accounts)
bool IMPLEMENT (has_set_thread_stack_guarantee)
bool IMPLEMENT (has_broken_rtl_query_process_debug_information)
+ bool IMPLEMENT (has_processor_groups)
#undef IMPLEMENT
};