public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: wincap: drop has_broken_prefetchvm flag and related code
@ 2022-05-13 12:39 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2022-05-13 12:39 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=bf6940a4133d920a75bed91b231cf2527173287c

commit bf6940a4133d920a75bed91b231cf2527173287c
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Mon Mar 7 12:30:32 2022 +0100

    Cygwin: wincap: drop has_broken_prefetchvm flag and related code
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/mmap.cc   | 10 +---------
 winsup/cygwin/wincap.cc | 13 -------------
 winsup/cygwin/wincap.h  |  2 --
 3 files changed, 1 insertion(+), 24 deletions(-)

diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index 7982fd18e..b38ffc39e 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -1487,15 +1487,7 @@ posix_madvise (void *addr, size_t len, int advice)
 	WIN32_MEMORY_RANGE_ENTRY me = { base, size };
 	if (!PrefetchVirtualMemory (GetCurrentProcess (), 1, &me, 0)
 	    && GetLastError () != ERROR_PROC_NOT_FOUND)
-	  {
-	    /* FIXME 2015-08-27: On W10 build 10240 under WOW64,
-	       PrefetchVirtualMemory always returns ERROR_INVALID_PARAMETER
-	       for some reason.  If we're running on W10 WOW64, ignore this
-	       error.  This has been fixed in W10 1511. */
-	    if (!wincap.has_broken_prefetchvm ()
-		|| GetLastError () != ERROR_INVALID_PARAMETER)
-	      ret = EINVAL;
-	  }
+	  ret = EINVAL;
       }
       break;
     case POSIX_MADV_DONTNEED:
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
index a1c0a452e..e67778c2c 100644
--- a/winsup/cygwin/wincap.cc
+++ b/winsup/cygwin/wincap.cc
@@ -27,7 +27,6 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
     has_gaa_largeaddress_bug:true,
     has_precise_system_time:false,
     has_microsoft_accounts:false,
-    has_broken_prefetchvm:false,
     has_new_pebteb_region:false,
     has_broken_whoami:true,
     has_unprivileged_createsymlink:false,
@@ -58,7 +57,6 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
     has_gaa_largeaddress_bug:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
-    has_broken_prefetchvm:false,
     has_new_pebteb_region:false,
     has_broken_whoami:false,
     has_unprivileged_createsymlink:false,
@@ -89,7 +87,6 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = {
     has_gaa_largeaddress_bug:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
-    has_broken_prefetchvm:false,
     has_new_pebteb_region:false,
     has_broken_whoami:false,
     has_unprivileged_createsymlink:false,
@@ -120,7 +117,6 @@ wincaps  wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared))
     has_gaa_largeaddress_bug:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
-    has_broken_prefetchvm:true,
     has_new_pebteb_region:false,
     has_broken_whoami:false,
     has_unprivileged_createsymlink:false,
@@ -151,7 +147,6 @@ wincaps  wincap_10_1607 __attribute__((section (".cygwin_dll_common"), shared))
     has_gaa_largeaddress_bug:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
-    has_broken_prefetchvm:true,
     has_new_pebteb_region:false,
     has_broken_whoami:false,
     has_unprivileged_createsymlink:false,
@@ -182,7 +177,6 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_gaa_largeaddress_bug:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
-    has_broken_prefetchvm:false,
     has_new_pebteb_region:true,
     has_broken_whoami:false,
     has_unprivileged_createsymlink:true,
@@ -213,7 +207,6 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_gaa_largeaddress_bug:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
-    has_broken_prefetchvm:false,
     has_new_pebteb_region:true,
     has_broken_whoami:false,
     has_unprivileged_createsymlink:true,
@@ -244,7 +237,6 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_gaa_largeaddress_bug:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
-    has_broken_prefetchvm:false,
     has_new_pebteb_region:true,
     has_broken_whoami:false,
     has_unprivileged_createsymlink:true,
@@ -275,7 +267,6 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_gaa_largeaddress_bug:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
-    has_broken_prefetchvm:false,
     has_new_pebteb_region:true,
     has_broken_whoami:false,
     has_unprivileged_createsymlink:true,
@@ -306,7 +297,6 @@ wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_gaa_largeaddress_bug:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
-    has_broken_prefetchvm:false,
     has_new_pebteb_region:true,
     has_broken_whoami:false,
     has_unprivileged_createsymlink:true,
@@ -337,7 +327,6 @@ wincaps wincap_10_2004 __attribute__((section (".cygwin_dll_common"), shared)) =
     has_gaa_largeaddress_bug:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
-    has_broken_prefetchvm:false,
     has_new_pebteb_region:true,
     has_broken_whoami:false,
     has_unprivileged_createsymlink:true,
@@ -368,7 +357,6 @@ wincaps wincap_11 __attribute__((section (".cygwin_dll_common"), shared)) = {
     has_gaa_largeaddress_bug:false,
     has_precise_system_time:true,
     has_microsoft_accounts:true,
-    has_broken_prefetchvm:false,
     has_new_pebteb_region:true,
     has_broken_whoami:false,
     has_unprivileged_createsymlink:true,
@@ -450,7 +438,6 @@ wincapc::init ()
   ((wincaps *)caps)->is_server = (version.wProductType != VER_NT_WORKSTATION);
     {
       ((wincaps *)caps)->has_gaa_largeaddress_bug = false;
-      ((wincaps *)caps)->has_broken_prefetchvm = false;
     }
 
   __small_sprintf (osnam, "NT-%d.%d", version.dwMajorVersion,
diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h
index 3114771e5..6b5723aa5 100644
--- a/winsup/cygwin/wincap.h
+++ b/winsup/cygwin/wincap.h
@@ -21,7 +21,6 @@ struct wincaps
     unsigned has_gaa_largeaddress_bug				: 1;
     unsigned has_precise_system_time				: 1;
     unsigned has_microsoft_accounts				: 1;
-    unsigned has_broken_prefetchvm				: 1;
     unsigned has_new_pebteb_region				: 1;
     unsigned has_broken_whoami					: 1;
     unsigned has_unprivileged_createsymlink			: 1;
@@ -82,7 +81,6 @@ public:
   bool	IMPLEMENT (has_gaa_largeaddress_bug)
   bool	IMPLEMENT (has_precise_system_time)
   bool	IMPLEMENT (has_microsoft_accounts)
-  bool	IMPLEMENT (has_broken_prefetchvm)
   bool	IMPLEMENT (has_new_pebteb_region)
   bool	IMPLEMENT (has_broken_whoami)
   bool	IMPLEMENT (has_unprivileged_createsymlink)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-13 12:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 12:39 [newlib-cygwin] Cygwin: wincap: drop has_broken_prefetchvm flag and related code Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).