1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-30 20:37:35 +00:00

Ports/bdwgc: Update bdwgc to version 8.2.2

This commit is contained in:
Cameron Youell 2023-03-27 20:35:57 +11:00 committed by Linus Groh
parent fb3a1e2341
commit 4900b34ae1
10 changed files with 105 additions and 215 deletions

View file

@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Thu, 24 Feb 2022 03:30:02 +0330
Date: Mon, 27 Mar 2023 20:10:51 +1100
Subject: [PATCH] Teach bdwgc about serenity signals
Serenity doesn't have the realtime POSIX signals, so use SIGXCPU and
@ -12,10 +12,10 @@ SIGXFSZ instead.
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/gc_config_macros.h b/include/gc_config_macros.h
index 14c65ee..c19b050 100644
index 3bbc5fe..da783ce 100644
--- a/include/gc_config_macros.h
+++ b/include/gc_config_macros.h
@@ -72,7 +72,7 @@
@@ -73,7 +73,7 @@
#if defined(GC_AIX_THREADS) || defined(GC_DARWIN_THREADS) \
|| defined(GC_DGUX386_THREADS) || defined(GC_FREEBSD_THREADS) \
@ -24,7 +24,7 @@ index 14c65ee..c19b050 100644
|| defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) \
|| defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS) \
|| defined(GC_OSF1_THREADS) || defined(GC_SOLARIS_THREADS) \
@@ -83,6 +83,8 @@
@@ -84,6 +84,8 @@
#elif defined(GC_THREADS)
# if defined(__linux__)
# define GC_LINUX_THREADS
@ -34,23 +34,23 @@ index 14c65ee..c19b050 100644
# define GC_OPENBSD_THREADS
# elif defined(_PA_RISC1_1) || defined(_PA_RISC2_0) || defined(hppa) \
diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h
index 629418f..1278091 100644
index b26543e..23e911e 100644
--- a/include/private/gc_priv.h
+++ b/include/private/gc_priv.h
@@ -2641,7 +2641,7 @@ GC_INNER void *GC_store_debug_info_inner(void *p, word sz, const char *str,
/* Linuxthreads itself uses SIGUSR1 and SIGUSR2. */
# define SIG_SUSPEND SIGPWR
# endif
-# elif defined(GC_OPENBSD_THREADS)
+# elif defined(GC_OPENBSD_THREADS) || defined(GC_SERENITY_THREADS)
@@ -2985,7 +2985,7 @@ GC_INNER void *GC_store_debug_info_inner(void *p, word sz, const char *str,
&& !defined(GC_USESIGRT_SIGNALS)
# define SIG_SUSPEND SIGUSR1
/* SIGTSTP and SIGCONT could be used alternatively on FreeBSD. */
-# elif defined(GC_OPENBSD_THREADS) && !defined(GC_USESIGRT_SIGNALS)
+# elif (defined(GC_OPENBSD_THREADS) && !defined(GC_USESIGRT_SIGNALS)) || defined(GC_SERENITY_THREADS)
# ifndef GC_OPENBSD_UTHREADS
# define SIG_SUSPEND SIGXFSZ
# endif
diff --git a/pthread_stop_world.c b/pthread_stop_world.c
index 4b2c429..25eb2a5 100644
index b865d30..f0cf1a6 100644
--- a/pthread_stop_world.c
+++ b/pthread_stop_world.c
@@ -146,7 +146,9 @@ STATIC volatile AO_t GC_world_is_stopped = FALSE;
@@ -165,7 +165,9 @@ STATIC volatile AO_t GC_world_is_stopped = FALSE;
* pointer(s) and acknowledge.
*/
#ifndef SIG_THR_RESTART