diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-10-29 06:49:49 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-10-29 06:49:49 -0700 |
commit | 927a2b27edc8e29d4c0a3e572c516738fd5d4341 (patch) | |
tree | 49999f0febe323235dea07d261341fe4c5b0bf26 /txr.h | |
parent | 2764d8e78d0d72f7c0d8fcc4e41cf4df41017026 (diff) | |
download | txr-927a2b27edc8e29d4c0a3e572c516738fd5d4341.tar.gz txr-927a2b27edc8e29d4c0a3e572c516738fd5d4341.tar.bz2 txr-927a2b27edc8e29d4c0a3e572c516738fd5d4341.zip |
Provide a way to free the continuation stacks.
* share/txr/stdlib/yield.tl (sys:obtain-impl): Pass
sys:cont-free symbol to each abandoned continuation
to release its stack buffer.
(obtain): Handle the sys:cont-free symbol in the
lambda, so the initial lambda can be treated
uniformly with continuation functions.
* txr.1: Documented sys:obtain-impl.
* unwind.c (sys_cont_free_s): New symbol variable.
(cont_mark): Check for null stack pointer and avoid marking.
(revive_cont): If arg is sys:cont-free, then free the
continuation and return nil. If the continuation has a null
stack buffer, throw an error.
(uw_late_init): Initialize sys_cont_free_s.
Diffstat (limited to 'txr.h')
0 files changed, 0 insertions, 0 deletions