diff --git a/src/c/threads/process.d b/src/c/threads/process.d index 72ed941cf..4dfa3ce97 100755 --- a/src/c/threads/process.d +++ b/src/c/threads/process.d @@ -266,7 +266,7 @@ thread_entry_point(void *arg) si_trap_fpe(@'last', ECL_T); ecl_bds_bind(env, @'mp::*current-process*', process); - ECL_RESTARTS_TRY(env, ecl_list1(Cnil), @'abort') { + ECL_RESTART_CASE_BEGIN(env, @'abort') { env->values[0] = cl_apply(2, process->process.function, process->process.args); { @@ -277,7 +277,7 @@ thread_entry_point(void *arg) } process->process.exit_values = output; } - } ECL_RESTARTS_CATCH(1,args) { + } ECL_RESTART_CASE(1,args) { /* ABORT restart. */ process->process.exit_values = args; } ECL_RESTARTS_END; diff --git a/src/cmp/proclamations.lsp b/src/cmp/proclamations.lsp index 24baf612c..d8317faa0 100644 --- a/src/cmp/proclamations.lsp +++ b/src/cmp/proclamations.lsp @@ -347,6 +347,7 @@ ;; ECL extensions (proclamation ext:catch-signal (fixnum gen-bool &key) null) +(proclamation si:bind-simple-restarts (t t) list) ;;; ;;; 10. SYMBOLS diff --git a/src/h/stacks.h b/src/h/stacks.h index 45bfe8c4c..ba54507c3 100755 --- a/src/h/stacks.h +++ b/src/h/stacks.h @@ -414,19 +414,19 @@ extern ECL_API ecl_frame_ptr _ecl_frs_push(register cl_env_ptr, register cl_obje #define ECL_CATCH_END } \ ecl_frs_pop(__the_env); } while (0) -#define ECL_RESTARTS_TRY(the_env, tag, names) do { \ +#define ECL_RESTART_CASE_BEGIN(the_env, names) do { \ const cl_env_ptr __the_env = (the_env); \ - const cl_object __ecl_tag = (tag); \ + const cl_object __ecl_tag = ecl_list1(names); \ ecl_bds_bind(__the_env, ECL_RESTART_CLUSTERS, \ si_bind_simple_restarts(__ecl_tag, names)); \ if (ecl_frs_push(__the_env,__ecl_tag) == 0) { -#define ECL_RESTARTS_CATCH(code, args) \ +#define ECL_RESTART_CASE(code, args) \ } else if (__the_env->values[1] == ecl_make_fixnum(code)) { \ const cl_object args = __the_env->values[0]; -#define ECL_RESTARTS_END } \ +#define ECL_RESTART_CASE_END } \ ecl_frs_pop(__the_env); \ ecl_bds_unwind1(__the_env); \ } while (0)