summaryrefslogtreecommitdiff
path: root/libguile/gc.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-07-24 15:29:48 +0200
committerAndy Wingo <wingo@pobox.com>2016-07-25 11:51:30 +0200
commit401214313b03803d754ed8836a6cb50ba456b2cb (patch)
tree275ca49c8ba406ff78dcd9443dac9580e30bbcc7 /libguile/gc.c
parentca2d00ad65e1e3db0a88f7964c5b0ab49b9471e9 (diff)
downloadguile-401214313b03803d754ed8836a6cb50ba456b2cb.tar.gz
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.
Diffstat (limited to 'libguile/gc.c')
-rw-r--r--libguile/gc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libguile/gc.c b/libguile/gc.c
index 13823c054..b75a688aa 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -1,5 +1,5 @@
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2006,
- * 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+ * 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -608,6 +608,12 @@ scm_storage_prehistory ()
setenv ("GC_MARKERS", "1", 1);
#endif
+#if SCM_I_GSC_USE_NULL_THREADS
+ /* If we have disabled threads in Guile, ensure that the GC doesn't
+ spawn any marker threads. */
+ setenv ("GC_MARKERS", "1", 1);
+#endif
+
GC_INIT ();
GC_expand_hp (DEFAULT_INITIAL_HEAP_SIZE);