X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fruntime%2Fthread.c;h=ab0db0886eab31ea383d5a85b60349a046e63e4d;hb=5e92e9ed61903658015c2a75c79a32ad41dbd29d;hp=2324ca71ac7f58e3615b74d0afacfa9aa17f3c06;hpb=a98bbf0cf10b8136707995a00a1c7240c05d02a9;p=sbcl.git diff --git a/src/runtime/thread.c b/src/runtime/thread.c index 2324ca7..ab0db08 100644 --- a/src/runtime/thread.c +++ b/src/runtime/thread.c @@ -84,8 +84,8 @@ initial_thread_trampoline(struct thread *th) #if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64) lispobj *args = NULL; #endif - function = th->unbound_marker; - th->unbound_marker = UNBOUND_MARKER_WIDETAG; + function = th->no_tls_value_marker; + th->no_tls_value_marker = NO_TLS_VALUE_MARKER_WIDETAG; if(arch_os_thread_init(th)==0) return 1; if(th->os_thread < 1) lose("th->os_thread not set up right"); @@ -109,8 +109,8 @@ new_thread_trampoline(struct thread *th) { lispobj function; int result; - function = th->unbound_marker; - th->unbound_marker = UNBOUND_MARKER_WIDETAG; + function = th->no_tls_value_marker; + th->no_tls_value_marker = NO_TLS_VALUE_MARKER_WIDETAG; if(arch_os_thread_init(th)==0) { /* FIXME: handle error */ lose("arch_os_thread_init failed\n"); @@ -173,13 +173,15 @@ create_thread_struct(lispobj initial_function) { #ifdef LISP_FEATURE_SB_THREAD int i; for(i=0;i<(dynamic_values_bytes/sizeof(lispobj));i++) - per_thread->dynamic_values[i]=UNBOUND_MARKER_WIDETAG; - if(SymbolValue(FREE_TLS_INDEX,0)==UNBOUND_MARKER_WIDETAG) + per_thread->dynamic_values[i]=NO_TLS_VALUE_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,15 +262,8 @@ 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->unbound_marker=initial_function; + th->interrupt_data->pending_handler = 0; + th->no_tls_value_marker=initial_function; return th; }