X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fthread.c;h=037756207433b060bb25151004dfd2d13d85fd77;hb=6ddaf294e5a7e3b1792ed1d9c342894c38538773;hp=2324ca71ac7f58e3615b74d0afacfa9aa17f3c06;hpb=a98bbf0cf10b8136707995a00a1c7240c05d02a9;p=sbcl.git diff --git a/src/runtime/thread.c b/src/runtime/thread.c index 2324ca7..0377562 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)) @@ -268,7 +270,7 @@ create_thread_struct(lispobj initial_function) { memcpy(th->interrupt_data,global_interrupt_data, sizeof (struct interrupt_data)); - th->unbound_marker=initial_function; + th->no_tls_value_marker=initial_function; return th; }