summaryrefslogtreecommitdiff
path: root/src/lisp/ao_lisp_make_const.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-11-11 21:16:09 -0800
committerKeith Packard <keithp@keithp.com>2017-02-20 11:16:50 -0800
commitdba374516ed396633659dec571b6a44b03da8ad1 (patch)
tree623d48c9ea938db3788ee96f9827ae13389108cd /src/lisp/ao_lisp_make_const.c
parent29c890b4599b3bbdbd09a5915ea68a63f4e0a9ac (diff)
altos/lisp: Add save/restore infrastructure. Needs OS support to work.
This sticks a few globals past the end of the heap and then asks the OS to save the heap. On restore, the heap is re-populated by the OS and then various global variables reset. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_make_const.c')
-rw-r--r--src/lisp/ao_lisp_make_const.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lisp/ao_lisp_make_const.c b/src/lisp/ao_lisp_make_const.c
index 0b3e25a6..0a8c9d07 100644
--- a/src/lisp/ao_lisp_make_const.c
+++ b/src/lisp/ao_lisp_make_const.c
@@ -67,6 +67,8 @@ struct builtin_func funcs[] = {
"flush", AO_LISP_FUNC_LAMBDA, builtin_flush,
"delay", AO_LISP_FUNC_LAMBDA, builtin_delay,
"led", AO_LISP_FUNC_LEXPR, builtin_led,
+ "save", AO_LISP_FUNC_LAMBDA, builtin_save,
+ "restore", AO_LISP_FUNC_LAMBDA, builtin_restore,
};
#define N_FUNC (sizeof funcs / sizeof funcs[0])