X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fthread.c;h=ab0db0886eab31ea383d5a85b60349a046e63e4d;hb=5e92e9ed61903658015c2a75c79a32ad41dbd29d;hp=117e3ec1bcb49a6a5a104dfc3779bd3cd4271630;hpb=862c0325616a991a5bd7b50d79f7176d2115493b;p=sbcl.git diff --git a/src/runtime/thread.c b/src/runtime/thread.c index 117e3ec..ab0db08 100644 --- a/src/runtime/thread.c +++ b/src/runtime/thread.c @@ -174,12 +174,14 @@ create_thread_struct(lispobj initial_function) { int i; for(i=0;i<(dynamic_values_bytes/sizeof(lispobj));i++) per_thread->dynamic_values[i]=NO_TLS_VALUE_MARKER_WIDETAG; - if(SymbolValue(FREE_TLS_INDEX,0)==UNBOUND_MARKER_WIDETAG) + if(SymbolValue(FREE_TLS_INDEX,0)==UNBOUND_MARKER_WIDETAG) { SetSymbolValue (FREE_TLS_INDEX, make_fixnum(MAX_INTERRUPTS+ sizeof(struct thread)/sizeof(lispobj)), 0); + SetSymbolValue(TLS_INDEX_LOCK,make_fixnum(0),0); + } #define STATIC_TLS_INIT(sym,field) \ ((struct symbol *)(sym-OTHER_POINTER_LOWTAG))->tls_index= \ make_fixnum(THREAD_SLOT_OFFSET_WORDS(field)) @@ -260,14 +262,7 @@ create_thread_struct(lispobj initial_function) { free_thread_struct(th); return 0; } - if(all_threads) - memcpy(th->interrupt_data, - arch_os_get_current_thread()->interrupt_data, - sizeof (struct interrupt_data)); - else - memcpy(th->interrupt_data,global_interrupt_data, - sizeof (struct interrupt_data)); - + th->interrupt_data->pending_handler = 0; th->no_tls_value_marker=initial_function; return th; }