From 0fd008d75ca451ba68ad8ae773ea8a5ebc1785c5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 11 Nov 2016 21:16:09 -0800 Subject: 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 --- src/lisp/ao_lisp_make_const.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/lisp/ao_lisp_make_const.c') 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]) -- cgit v1.2.3