summaryrefslogtreecommitdiff
path: root/libguile/vm-engine.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-09-16 12:48:41 +0200
committerAndy Wingo <wingo@pobox.com>2010-09-16 12:48:41 +0200
commitf312025167c5a93aacae69aef63be2fdc6bed7c6 (patch)
tree6290a69c0e5c2db70ca83281cea8b47175821adc /libguile/vm-engine.h
parentc45d4d775d47bd80650e9888bf47815a03b04332 (diff)
downloadguile-f312025167c5a93aacae69aef63be2fdc6bed7c6.tar.gz
add vm-abort-continuation-hook, vm-restore-continuation-hook
* libguile/vm-i-system.c (call_cc, tail_call_cc): Call the new RESTORE_CONTINUATION_HOOK when a continuation is restored. (prompt): Call the new ABORT_CONTINUATION_HOOK when entering the abort handler's continuation. * libguile/vm-engine.h (ABORT_CONTINUATION_HOOK) (RESTORE_CONTINUATION_HOOK): * libguile/vm.h (SCM_VM_ABORT_CONTINUATION_HOOK) (SCM_VM_RESTORE_CONTINUATION_HOOK): * libguile/vm.c: (scm_vm_abort_continuation_hook): New hook, called when entering an abort handler. (scm_vm_restore_continuation_hook): New hook, called after returning to a continuation. * module/system/vm/vm.scm: Add hooks to export list.
Diffstat (limited to 'libguile/vm-engine.h')
-rw-r--r--libguile/vm-engine.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libguile/vm-engine.h b/libguile/vm-engine.h
index dd735a365..ad226dc03 100644
--- a/libguile/vm-engine.h
+++ b/libguile/vm-engine.h
@@ -232,6 +232,10 @@
RUN_HOOK1 (SCM_VM_POP_CONTINUATION_HOOK, SCM_I_MAKINUM (n))
#define NEXT_HOOK() \
RUN_HOOK (SCM_VM_NEXT_HOOK)
+#define ABORT_CONTINUATION_HOOK() \
+ RUN_HOOK (SCM_VM_ABORT_CONTINUATION_HOOK)
+#define RESTORE_CONTINUATION_HOOK() \
+ RUN_HOOK (SCM_VM_RESTORE_CONTINUATION_HOOK)
#define VM_HANDLE_INTERRUPTS \
SCM_ASYNC_TICK_WITH_CODE (SYNC_REGISTER ())