summaryrefslogtreecommitdiff
path: root/libguile/__scm.h
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@lilypond.org>2008-09-09 23:08:16 -0300
committerHan-Wen Nienhuys <hanwen@lilypond.org>2008-09-09 23:08:16 -0300
commit7ddb9baf80744f0ea4810c35b465d96f48338750 (patch)
tree7827a68cb9a524b33936703b113140e452b60c76 /libguile/__scm.h
parenta8db4a59c898598cc55dd3bd86a6fd8618721d10 (diff)
downloadguile-7ddb9baf80744f0ea4810c35b465d96f48338750.tar.gz
Cleanup mark-during-GC debug checks.
* libguile/__scm.h (SCM_DEBUG): add SCM_DEBUG_MARKING_API * libguile/gc.h (SCM_SET_GC_MARK): depending on SCM_DEBUG_MARKING_API crash if someone is touching markbits outside regular hours. Rename ensure_marking() to scm_i_ensure_marking(). * libguile/inline.h (scm_double_cell, scm_cell): only set mark bits for debugging if SCM_DEBUG_MARKING_API is unset * libguile/gc-mark.c: Issue deprecation warning if we are marking outside of the GC mark phase.
Diffstat (limited to 'libguile/__scm.h')
-rw-r--r--libguile/__scm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libguile/__scm.h b/libguile/__scm.h
index 30077fd46..d486b69bf 100644
--- a/libguile/__scm.h
+++ b/libguile/__scm.h
@@ -197,6 +197,14 @@
#define SCM_DEBUG 0
#endif
+/* For debugging purposes: define this is to ensure nobody is using
+ * the mark bits outside of the marking phase. This is meant for
+ * debugging purposes only.
+ */
+#ifndef SCM_DEBUG_MARKING_API
+#define SCM_DEBUG_MARKING_API 0
+#endif
+
/* If SCM_DEBUG_CELL_ACCESSES is set to 1, cell accesses will perform
* exhaustive parameter checking: It will be verified that cell parameters
* actually point to a valid heap cell. Note: If this option is enabled,