klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 8ddf76d83c123a52e49ae03c32eec64242170f93
parent 9a58cd20a4c2d76ce3d8b9a3f6925c08956bb257
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri, 24 Aug 2012 03:03:02 -0300

Fixed some lock issues in keval.c

Diffstat:
Msrc/keval.c | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/keval.c b/src/keval.c @@ -101,10 +101,8 @@ void do_combine_operands(klisp_State *K) avoid mutation of the structure affecting evaluation; this also allows capturing continuations in the middle of argument evaluation with no additional overhead */ - klisp_lock(K); TValue arg_ls = check_copy_list(K, operands, false, &pairs, &cpairs); - klisp_unlock(K); apairs = pairs - cpairs; krooted_tvs_push(K, arg_ls); TValue els_cont = @@ -187,9 +185,7 @@ void keval_ofn(klisp_State *K) break; } case K_TSYMBOL: { - klisp_lock(K); TValue res = kget_binding(K, denv, obj); - klisp_unlock(K); kapply_cc(K, res); break; } @@ -199,9 +195,9 @@ void keval_ofn(klisp_State *K) } /* init continuation names */ +/* LOCK: this is done before allowing multiple threads */ void kinit_eval_cont_names(klisp_State *K) { -/* XXX lock? */ Table *t = tv2table(G(K)->cont_name_table); add_cont_name(K, t, do_eval_ls, "eval-argument-list"); add_cont_name(K, t, do_combine_operator, "eval-combine-operator");