1996-07-25 22:56:11 +00:00
|
|
|
|
/* classes: h_files */
|
|
|
|
|
|
|
2001-08-31 10:42:19 +00:00
|
|
|
|
#ifndef SCM_DYNWIND_H
|
|
|
|
|
|
#define SCM_DYNWIND_H
|
|
|
|
|
|
|
2006-04-17 00:05:42 +00:00
|
|
|
|
/* Copyright (C) 1995,1996,1998,1999,2000,2003,2004, 2006 Free Software Foundation, Inc.
|
2001-08-31 10:42:19 +00:00
|
|
|
|
*
|
2003-04-05 19:15:35 +00:00
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2001-08-31 10:42:19 +00:00
|
|
|
|
*
|
2003-04-05 19:15:35 +00:00
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
1996-07-25 22:56:11 +00:00
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2003-04-05 19:15:35 +00:00
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
|
* Lesser General Public License for more details.
|
2001-08-31 10:42:19 +00:00
|
|
|
|
*
|
2003-04-05 19:15:35 +00:00
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2005-05-23 19:57:22 +00:00
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2003-04-05 19:15:35 +00:00
|
|
|
|
*/
|
2001-08-31 10:42:19 +00:00
|
|
|
|
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2001-08-31 10:42:19 +00:00
|
|
|
|
|
* alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
feature.h, filesys.h, fports.h, gc.h, gdbint.h, genio.h, gsubr.h,
hash.h, init.h, ioext.h, kw.h, list.h, markers.h, marksweep.h,
mbstrings.h, numbers.h, objprop.h, options.h, pairs.h, ports.h,
posix.h, print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
vports.h, weaks.h: #include "libguile/__scm.h", not
<libguile/__scm.h>. This allows 'gcc -MM' to determine which
dependencies are within libguile properly.
1996-09-05 21:19:08 +00:00
|
|
|
|
#include "libguile/__scm.h"
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-06-14 19:50:43 +00:00
|
|
|
|
typedef void (*scm_t_guard) (void *);
|
|
|
|
|
|
typedef SCM (*scm_t_inner) (void *);
|
1998-06-18 21:53:00 +00:00
|
|
|
|
|
2001-11-02 00:19:12 +00:00
|
|
|
|
SCM_API SCM scm_dynamic_wind (SCM thunk1, SCM thunk2, SCM thunk3);
|
|
|
|
|
|
SCM_API SCM scm_internal_dynamic_wind (scm_t_guard before,
|
|
|
|
|
|
scm_t_inner inner,
|
|
|
|
|
|
scm_t_guard after,
|
|
|
|
|
|
void *inner_data,
|
|
|
|
|
|
void *guard_data);
|
|
|
|
|
|
SCM_API void scm_dowinds (SCM to, long delta);
|
2004-01-07 20:21:30 +00:00
|
|
|
|
SCM_API void scm_i_dowinds (SCM to, long delta,
|
(scm_t_frame_flags, scm_t_wind_flags,
scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
New.
(scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
scm_i_dowinds and extended to handle frames and to invoke a 'turn'
function when the outermost wind point has been reached. The
latter is used to copy a continuation stack at the right time.
scm_dowinds remains available.
(SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
tc16_guard, guards_print): Removed.
(scm_internal_dynamic_wind): Reimplemented using frames.
2004-01-03 21:49:16 +00:00
|
|
|
|
void (*turn_func) (void *), void *data);
|
2001-11-02 00:19:12 +00:00
|
|
|
|
SCM_API void scm_init_dynwind (void);
|
1996-07-25 22:56:11 +00:00
|
|
|
|
|
2001-11-02 00:19:12 +00:00
|
|
|
|
SCM_API void scm_swap_bindings (SCM vars, SCM vals);
|
2001-08-25 16:08:13 +00:00
|
|
|
|
|
(scm_t_frame_flags, scm_t_wind_flags,
scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
New.
(scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
scm_i_dowinds and extended to handle frames and to invoke a 'turn'
function when the outermost wind point has been reached. The
latter is used to copy a continuation stack at the right time.
scm_dowinds remains available.
(SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
tc16_guard, guards_print): Removed.
(scm_internal_dynamic_wind): Reimplemented using frames.
2004-01-03 21:49:16 +00:00
|
|
|
|
typedef enum {
|
2006-01-29 00:23:28 +00:00
|
|
|
|
SCM_F_DYNWIND_REWINDABLE = (1 << 0)
|
|
|
|
|
|
} scm_t_dynwind_flags;
|
(scm_t_frame_flags, scm_t_wind_flags,
scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
New.
(scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
scm_i_dowinds and extended to handle frames and to invoke a 'turn'
function when the outermost wind point has been reached. The
latter is used to copy a continuation stack at the right time.
scm_dowinds remains available.
(SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
tc16_guard, guards_print): Removed.
(scm_internal_dynamic_wind): Reimplemented using frames.
2004-01-03 21:49:16 +00:00
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
2004-01-06 17:57:41 +00:00
|
|
|
|
SCM_F_WIND_EXPLICITLY = (1 << 0)
|
(scm_t_frame_flags, scm_t_wind_flags,
scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
New.
(scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
scm_i_dowinds and extended to handle frames and to invoke a 'turn'
function when the outermost wind point has been reached. The
latter is used to copy a continuation stack at the right time.
scm_dowinds remains available.
(SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
tc16_guard, guards_print): Removed.
(scm_internal_dynamic_wind): Reimplemented using frames.
2004-01-03 21:49:16 +00:00
|
|
|
|
} scm_t_wind_flags;
|
|
|
|
|
|
|
2006-01-29 00:23:28 +00:00
|
|
|
|
SCM_API void scm_dynwind_begin (scm_t_dynwind_flags);
|
|
|
|
|
|
SCM_API void scm_dynwind_end (void);
|
2004-01-07 18:03:33 +00:00
|
|
|
|
|
2006-01-29 00:23:28 +00:00
|
|
|
|
SCM_API void scm_dynwind_unwind_handler (void (*func) (void *), void *data,
|
|
|
|
|
|
scm_t_wind_flags);
|
|
|
|
|
|
SCM_API void scm_dynwind_rewind_handler (void (*func) (void *), void *data,
|
|
|
|
|
|
scm_t_wind_flags);
|
2004-01-11 00:51:19 +00:00
|
|
|
|
|
2006-01-29 00:23:28 +00:00
|
|
|
|
SCM_API void scm_dynwind_unwind_handler_with_scm (void (*func) (SCM), SCM data,
|
|
|
|
|
|
scm_t_wind_flags);
|
|
|
|
|
|
SCM_API void scm_dynwind_rewind_handler_with_scm (void (*func) (SCM), SCM data,
|
|
|
|
|
|
scm_t_wind_flags);
|
2004-01-06 17:57:41 +00:00
|
|
|
|
|
2006-01-29 00:23:28 +00:00
|
|
|
|
SCM_API void scm_dynwind_free (void *mem);
|
2004-08-10 13:35:28 +00:00
|
|
|
|
|
1998-10-15 14:35:35 +00:00
|
|
|
|
#ifdef GUILE_DEBUG
|
2001-11-02 00:19:12 +00:00
|
|
|
|
SCM_API SCM scm_wind_chain (void);
|
1998-10-15 14:35:35 +00:00
|
|
|
|
#endif /*GUILE_DEBUG*/
|
|
|
|
|
|
|
2001-08-31 10:42:19 +00:00
|
|
|
|
#endif /* SCM_DYNWIND_H */
|
2000-03-19 19:01:16 +00:00
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
Local Variables:
|
|
|
|
|
|
c-file-style: "gnu"
|
|
|
|
|
|
End:
|
|
|
|
|
|
*/
|