From 1d5cd9c626bb4afded88e7d2a48e1c9fb7b07e13 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Sun, 12 Mar 2017 23:01:08 +0000 Subject: [PATCH] TODO for loading param_objs on thread spawn --- runtime.c | 11 +++++++++++ scheme/base.sld | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/runtime.c b/runtime.c index f73eefc9..2cb36a4e 100644 --- a/runtime.c +++ b/runtime.c @@ -5340,6 +5340,17 @@ void *Cyc_init_thread(object thread_and_thunk) thd->gc_num_args = 1; thd->gc_args[0] = &Cyc_91end_91thread_67_primitive; thd->thread_id = pthread_self(); + +// TODO: want to get thread params from calling thread, and probably +// allocate a new set of cells instead of just assigning this thread's +// params to the parent's params. + + vector_type *t = (vector_type *)thd->scm_thread_obj; + object op = Cyc_vector_ref(thd, t, obj_int2obj(2)); + c_opaque_type *o = (c_opaque_type *)op; +// thd->param_objs = ?? +// END TODO + gc_add_mutator(thd); ck_pr_cas_int((int *)&(thd->thread_state), CYC_THREAD_STATE_NEW, CYC_THREAD_STATE_RUNNABLE); diff --git a/scheme/base.sld b/scheme/base.sld index 95ee2deb..d046b8f8 100644 --- a/scheme/base.sld +++ b/scheme/base.sld @@ -962,7 +962,6 @@ return_closcall1(data, k, thd->param_objs); ") (define *parameter-id* 0) (define (make-parameter init . o) - ;; TODO: need to store/set value in the thread data parameter (param_objs), to make it thread-specific (let* ((converter (if (pair? o) (car o) (lambda (x) x))) (value (converter init))