From a964bb17ae47fafbf4368a0766abe7b31201e96a Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 13 Mar 2017 12:15:43 +0000 Subject: [PATCH] WIP --- runtime.c | 12 ++++++++---- srfi/18.sld | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/runtime.c b/runtime.c index 2cb36a4e..bee3855f 100644 --- a/runtime.c +++ b/runtime.c @@ -5341,14 +5341,18 @@ void *Cyc_init_thread(object thread_and_thunk) 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. - + 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 = ?? + object obj = ((gc_thread_data *)o->ptr)->param_objs; + while (obj) { + + } // END TODO gc_add_mutator(thd); diff --git a/srfi/18.sld b/srfi/18.sld index 7353a0c9..43ebc45e 100644 --- a/srfi/18.sld +++ b/srfi/18.sld @@ -99,6 +99,8 @@ (thread-params (cons t (lambda () (vector-set! t 2 (%get-thread-data)) (thunk))))) + (vector-set! t 2 (%get-thread-data)) ;; Temporarily make parent thread + ;; data available for child init (Cyc-minor-gc) (Cyc-spawn-thread! thread-params) ))