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_builtin.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lisp/ao_lisp_builtin.c') diff --git a/src/lisp/ao_lisp_builtin.c b/src/lisp/ao_lisp_builtin.c index 30631980..ebc69f77 100644 --- a/src/lisp/ao_lisp_builtin.c +++ b/src/lisp/ao_lisp_builtin.c @@ -82,6 +82,9 @@ static const ao_poly builtin_names[] = { [builtin_flush] = _ao_lisp_atom_flush, [builtin_delay] = _ao_lisp_atom_delay, [builtin_led] = _ao_lisp_atom_led, + [builtin_save] = _ao_lisp_atom_save, + [builtin_restore] = _ao_lisp_atom_restore, + }; static char * @@ -591,5 +594,7 @@ const ao_lisp_func_t ao_lisp_builtins[] = { [builtin_flush] = ao_lisp_flush, [builtin_led] = ao_lisp_led, [builtin_delay] = ao_lisp_delay, + [builtin_save] = ao_lisp_save, + [builtin_restore] = ao_lisp_restore, }; -- cgit v1.2.3