public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: drop wincap::def_guard_pages Date: Sun, 4 Dec 2022 13:27:57 +0000 (GMT) [thread overview] Message-ID: <20221204132757.8C41338518B5@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=ef741db52b4897de7bc169e2b9e76a07ba4d1ff3 commit ef741db52b4897de7bc169e2b9e76a07ba4d1ff3 Author: Corinna Vinschen <corinna@vinschen.de> AuthorDate: Tue Nov 15 17:56:42 2022 +0100 Commit: Corinna Vinschen <corinna@vinschen.de> CommitDate: Sun Dec 4 14:01:41 2022 +0100 Cygwin: drop wincap::def_guard_pages Only required for Windows 7. Define constant value DEFAULT_GUARD_PAGE_COUNT instead. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Diff: --- winsup/cygwin/local_includes/memory_layout.h | 3 +++ winsup/cygwin/local_includes/wincap.h | 5 +++-- winsup/cygwin/wincap.cc | 12 ------------ 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/winsup/cygwin/local_includes/memory_layout.h b/winsup/cygwin/local_includes/memory_layout.h index 6a4b7a28a11c..481215b06a59 100644 --- a/winsup/cygwin/local_includes/memory_layout.h +++ b/winsup/cygwin/local_includes/memory_layout.h @@ -56,3 +56,6 @@ details. */ Set the lowest address to leave ~32 Gigs for heap. */ #define MMAP_STORAGE_LOW 0x001000000000UL #define MMAP_STORAGE_HIGH 0x700000000000UL + +/* Default number of pages used as thread stack guard pages. */ +#define DEFAULT_GUARD_PAGE_COUNT 3 diff --git a/winsup/cygwin/local_includes/wincap.h b/winsup/cygwin/local_includes/wincap.h index d5579e7ea71a..c6dbd2311078 100644 --- a/winsup/cygwin/local_includes/wincap.h +++ b/winsup/cygwin/local_includes/wincap.h @@ -9,9 +9,10 @@ details. */ #ifndef _WINCAP_H #define _WINCAP_H +#include "memory_layout.h" + struct wincaps { - DWORD def_guard_pages; /* The bitfields must be 8 byte aligned on x86_64, otherwise the bitfield ops generated by gcc are off by 4 bytes. */ struct __attribute__ ((aligned (8))) { @@ -64,7 +65,7 @@ public: DWORD def_guard_page_size () const { - return ((wincaps *) this->caps)->def_guard_pages * page_size (); + return DEFAULT_GUARD_PAGE_COUNT * page_size (); } bool IMPLEMENT (is_server) bool IMPLEMENT (has_new_pebteb_region) diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 7aefde48cb49..702d99e15b85 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -20,7 +20,6 @@ details. */ puzzled that this has never been noticed before... */ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { - def_guard_pages:2, { is_server:false, has_new_pebteb_region:false, @@ -43,7 +42,6 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { }; wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { - def_guard_pages:3, { is_server:false, has_new_pebteb_region:false, @@ -66,7 +64,6 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { }; wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = { - def_guard_pages:3, { is_server:false, has_new_pebteb_region:false, @@ -89,7 +86,6 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = { }; wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) = { - def_guard_pages:3, { is_server:false, has_new_pebteb_region:false, @@ -112,7 +108,6 @@ wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) }; wincaps wincap_10_1607 __attribute__((section (".cygwin_dll_common"), shared)) = { - def_guard_pages:3, { is_server:false, has_new_pebteb_region:false, @@ -135,7 +130,6 @@ wincaps wincap_10_1607 __attribute__((section (".cygwin_dll_common"), shared)) }; wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = { - def_guard_pages:3, { is_server:false, has_new_pebteb_region:true, @@ -158,7 +152,6 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = }; wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = { - def_guard_pages:3, { is_server:false, has_new_pebteb_region:true, @@ -181,7 +174,6 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = }; wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = { - def_guard_pages:3, { is_server:false, has_new_pebteb_region:true, @@ -204,7 +196,6 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = }; wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = { - def_guard_pages:3, { is_server:false, has_new_pebteb_region:true, @@ -227,7 +218,6 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = }; wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) = { - def_guard_pages:3, { is_server:false, has_new_pebteb_region:true, @@ -250,7 +240,6 @@ wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) = }; wincaps wincap_10_2004 __attribute__((section (".cygwin_dll_common"), shared)) = { - def_guard_pages:3, { is_server:false, has_new_pebteb_region:true, @@ -273,7 +262,6 @@ wincaps wincap_10_2004 __attribute__((section (".cygwin_dll_common"), shared)) = }; wincaps wincap_11 __attribute__((section (".cygwin_dll_common"), shared)) = { - def_guard_pages:3, { is_server:false, has_new_pebteb_region:true,
reply other threads:[~2022-12-04 13:27 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221204132757.8C41338518B5@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).