mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-14 00:07:36 +02:00
TODO for loading param_objs on thread spawn
This commit is contained in:
parent
609395886a
commit
1d5cd9c626
2 changed files with 11 additions and 1 deletions
11
runtime.c
11
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);
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue