diff --git a/runtime.c b/runtime.c index 00c379b7..fa6129bd 100644 --- a/runtime.c +++ b/runtime.c @@ -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 diff --git a/srfi/18.sld b/srfi/18.sld index 9c126d25..d3ea0033 100644 --- a/srfi/18.sld +++ b/srfi/18.sld @@ -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))