-/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004, 2006 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
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
\f
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#define SET_ASYNC_GOT_IT(X, V) (SCM_SET_CELL_WORD_0 ((X), SCM_TYP16 (X) | ((V) << 16)))
#define ASYNC_THUNK(X) SCM_CELL_OBJECT_1 (X)
-static SCM
-async_gc_mark (SCM obj)
-{
- return ASYNC_THUNK (obj);
-}
SCM_DEFINE (scm_async, "async", 1, 0, 0,
(SCM thunk),
}
void
-scm_frame_block_asyncs ()
+scm_dynwind_block_asyncs ()
{
scm_i_thread *t = SCM_I_CURRENT_THREAD;
- scm_frame_rewind_handler (increase_block, t, SCM_F_WIND_EXPLICITLY);
- scm_frame_unwind_handler (decrease_block, t, SCM_F_WIND_EXPLICITLY);
+ scm_dynwind_rewind_handler (increase_block, t, SCM_F_WIND_EXPLICITLY);
+ scm_dynwind_unwind_handler (decrease_block, t, SCM_F_WIND_EXPLICITLY);
}
void
-scm_frame_unblock_asyncs ()
+scm_dynwind_unblock_asyncs ()
{
scm_i_thread *t = SCM_I_CURRENT_THREAD;
if (t->block_asyncs == 0)
scm_misc_error ("scm_with_unblocked_asyncs",
"asyncs already unblocked", SCM_EOL);
- scm_frame_rewind_handler (decrease_block, t, SCM_F_WIND_EXPLICITLY);
- scm_frame_unwind_handler (increase_block, t, SCM_F_WIND_EXPLICITLY);
+ scm_dynwind_rewind_handler (decrease_block, t, SCM_F_WIND_EXPLICITLY);
+ scm_dynwind_unwind_handler (increase_block, t, SCM_F_WIND_EXPLICITLY);
}
{
scm_asyncs = SCM_EOL;
tc16_async = scm_make_smob_type ("async", 0);
- scm_set_smob_mark (tc16_async, async_gc_mark);
#include "libguile/async.x"
}