mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-18 21:29:18 +02:00
Allow optional thread cont arg
This commit is contained in:
parent
53b8644e5d
commit
10630b4907
2 changed files with 7 additions and 1 deletions
|
@ -6624,7 +6624,11 @@ void *Cyc_init_thread(object thread_and_thunk)
|
|||
thd->scm_thread_obj = car(thread_and_thunk);
|
||||
thd->gc_cont = cdr(thread_and_thunk);
|
||||
thd->gc_num_args = 1;
|
||||
thd->gc_args[0] = &Cyc_91end_91thread_67_primitive;
|
||||
if (t->num_elements >= 7 && t->elements[6] != boolean_f) {
|
||||
thd->gc_args[0] = t->elements[6];
|
||||
} else {
|
||||
thd->gc_args[0] = &Cyc_91end_91thread_67_primitive;
|
||||
}
|
||||
thd->thread_id = pthread_self();
|
||||
|
||||
// Copy thread params from the calling thread
|
||||
|
|
|
@ -71,12 +71,14 @@
|
|||
;; - name
|
||||
;; - specific
|
||||
;; - internal
|
||||
;; - end of thread cont (or #f for default)
|
||||
(vector
|
||||
'cyc-thread-obj
|
||||
thunk
|
||||
(%alloc-thread-data) ;; Internal data for new thread
|
||||
name-str
|
||||
#f
|
||||
#f
|
||||
#f)))
|
||||
|
||||
(define (thread-name t) (vector-ref t 3))
|
||||
|
|
Loading…
Add table
Reference in a new issue