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>
This commit is contained in:
Corinna Vinschen 2022-11-15 17:56:42 +01:00
parent ae2829a226
commit ef741db52b
3 changed files with 6 additions and 14 deletions

View File

@ -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

View File

@ -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)

View File

@ -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,