1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-06 04:00:26 +02:00

Use Whippet API for signal handler thread

* libguile/scmsigs.c (signal_delivery_thread): Use Whippet API.
This commit is contained in:
Andy Wingo 2025-05-15 12:05:52 +02:00
parent 799901edc4
commit f5a1d2ca33

View file

@ -43,11 +43,11 @@
#include <full-write.h> #include <full-write.h>
#include "async.h" #include "async.h"
#include "bdw-gc.h"
#include "boolean.h" #include "boolean.h"
#include "dynwind.h" #include "dynwind.h"
#include "eval.h" #include "eval.h"
#include "feature.h" #include "feature.h"
#include "gc-internal.h"
#include "gsubr.h" #include "gsubr.h"
#include "list.h" #include "list.h"
#include "modules.h" #include "modules.h"
@ -161,11 +161,8 @@ signal_delivery_thread (void *data)
#if HAVE_PTHREAD_SIGMASK /* not on mingw, see notes above */ #if HAVE_PTHREAD_SIGMASK /* not on mingw, see notes above */
sigset_t all_sigs; sigset_t all_sigs;
sigfillset (&all_sigs); sigfillset (&all_sigs);
/* On libgc 7.1 and earlier, GC_do_blocking doesn't actually do if (gc_safepoint_mechanism() == GC_SAFEPOINT_MECHANISM_SIGNAL)
anything. So in that case, libgc will want to suspend the signal sigdelset (&all_sigs, gc_safepoint_signal_number());
delivery thread, so we need to allow it to do so by unmasking the
suspend signal. */
sigdelset (&all_sigs, GC_get_suspend_signal ());
scm_i_pthread_sigmask (SIG_SETMASK, &all_sigs, NULL); scm_i_pthread_sigmask (SIG_SETMASK, &all_sigs, NULL);
#endif #endif