summaryrefslogtreecommitdiff
path: root/libguile/vm.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-12-12 20:55:08 +0100
committerAndy Wingo <wingo@pobox.com>2016-12-12 21:13:00 +0100
commit6dd87f4d8c764360c8d22c03f65603ea8b8c9e78 (patch)
tree6a502663cd206f0b4a46f61e8eb090ba4bd2e78b /libguile/vm.h
parentbf4a97898beac167e8b4f565ce4c7540bed24685 (diff)
downloadguile-6dd87f4d8c764360c8d22c03f65603ea8b8c9e78.tar.gz
Add suspendable-continuation?
* doc/ref/api-control.texi (Prompt Primitives): Document suspendable-continuation?. * libguile/control.c (scm_suspendable_continuation_p): New procedure. (scm_init_ice_9_control): New extension procedure, defines suspendable-continuation?. (scm_init_control): Register scm_init_ice_9_control. * libguile/eval.c (eval): * libguile/throw.c (catch): * libguile/continuations.c (scm_i_make_continuation): Restore resumable prompt cookie after continuation invocation. * libguile/vm.c (scm_call_n): Arrange to set resumable_prompt_cookie during invocation of VM. * libguile/vm.h (struct scm_vm): Add resumable_prompt_cookie member. * module/ice-9/control.scm: Export suspendable-continuation?. * test-suite/tests/control.test ("suspendable-continuation?"): New test.
Diffstat (limited to 'libguile/vm.h')
-rw-r--r--libguile/vm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libguile/vm.h b/libguile/vm.h
index 2ca4f2ab4..b26f7f406 100644
--- a/libguile/vm.h
+++ b/libguile/vm.h
@@ -47,6 +47,7 @@ struct scm_vm {
union scm_vm_stack_element *stack_top; /* highest address in allocated stack */
SCM overflow_handler_stack; /* alist of max-stack-size -> thunk */
SCM hooks[SCM_VM_NUM_HOOKS]; /* hooks */
+ const void *resumable_prompt_cookie; /* opaque cookie */
int engine; /* which vm engine we're using */
};