diff options
author | Han-Wen Nienhuys <hanwen@lilypond.org> | 2008-09-09 23:08:16 -0300 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@lilypond.org> | 2008-09-09 23:08:16 -0300 |
commit | 7ddb9baf80744f0ea4810c35b465d96f48338750 (patch) | |
tree | 7827a68cb9a524b33936703b113140e452b60c76 /libguile/inline.h | |
parent | a8db4a59c898598cc55dd3bd86a6fd8618721d10 (diff) | |
download | guile-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/inline.h')
-rw-r--r-- | libguile/inline.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libguile/inline.h b/libguile/inline.h index a9b3dc544..f3c76b5e2 100644 --- a/libguile/inline.h +++ b/libguile/inline.h @@ -134,12 +134,14 @@ scm_cell (scm_t_bits car, scm_t_bits cdr) } } +#if (SCM_DEBUG_MARKING_API == 0) /* Always set mark. Otherwise cells that are alloced before scm_debug_cell_accesses_p is toggled seem invalid. */ SCM_SET_GC_MARK (z); - +#endif /* SCM_DEBUG_MARKING_API */ + /* TODO: figure out if this use of mark bits is valid with threading. What if another thread is doing GC at this point @@ -202,10 +204,11 @@ scm_double_cell (scm_t_bits car, scm_t_bits cbr, abort(); } } - +#if (SCM_DEBUG_MARKING_API == 0) /* see above. */ SCM_SET_GC_MARK (z); - +#endif /* SCM_DEBUG_MARKING_API */ + #endif /* When this function is inlined, it's possible that the last |