[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 02/02: Fix --without-threads against threaded BDW-GC
From: |
Andy Wingo |
Subject: |
[Guile-commits] 02/02: Fix --without-threads against threaded BDW-GC |
Date: |
Sun, 24 Jul 2016 13:31:28 +0000 (UTC) |
wingo pushed a commit to branch stable-2.0
in repository guile.
commit b491b32cd114e2f80c6a1a899790c3b4f4dff1a1
Author: Andy Wingo <address@hidden>
Date: Sun Jul 24 15:29:48 2016 +0200
Fix --without-threads against threaded BDW-GC
* libguile/gc.c (scm_storage_prehistory): Prevent BDW-GC from spawning
marker threads if Guile was built without threading support.
---
libguile/gc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libguile/gc.c b/libguile/gc.c
index 097cb3d..a25467b 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -610,6 +610,12 @@ scm_storage_prehistory ()
GC_set_free_space_divisor (free_space_divisor);
GC_set_finalize_on_demand (1);
+#if SCM_I_GSC_USE_NULL_THREADS
+ /* If we have disabled threads in Guile, ensure that the GC doesn't
+ spawn any markern threads. */
+ setenv ("GC_MARKERS", "1", 1);
+#endif
+
GC_INIT ();
#if (! ((defined GC_VERSION_MAJOR) && (GC_VERSION_MAJOR >= 7))) \