scm_with_guile calls GC_call_with_gc_active
authorAndy Wingo <wingo@pobox.com>
Sat, 22 Jan 2011 18:55:31 +0000 (19:55 +0100)
committerAndy Wingo <wingo@pobox.com>
Sat, 22 Jan 2011 18:55:31 +0000 (19:55 +0100)
commitcde24ce12bcef1205d36ac73aa7cc043c79ab257
treeefcaa02c68d55fc885e0fbe62fd4220b6cfd0185
parent6d6b2d4fcd3fa1cf5f5d0be7cf6f35cb7287a682
scm_with_guile calls GC_call_with_gc_active

* configure.ac: Check for GC_call_with_gc_active.

* libguile/threads.h (scm_i_thread): Remove "top", as it's not used.

* libguile/threads.c (with_gc_inactive, with_gc_active): Define shims to
  GC_do_blocking and GC_call_with_gc_active.
  (scm_i_init_thread_for_guile): Don't do thread base adjustment here,
  do it in scm_i_with_guile_and_parent.  The previous logic would never
  be run.
  (scm_i_with_guile_and_parent): If we enter Guile mode, leave it too.
  Take care of adjusting the thread stack base here too.  Also, call
  with_gc_active.
  (scm_without_guile): Refactor.
configure.ac
libguile/threads.c
libguile/threads.h