Diff of /src/runtime/thread.c [5d1093] .. [4e815e]  Maximize  Restore

Switch to unified view

a/src/runtime/thread.c b/src/runtime/thread.c
...
...
627
627
628
#ifdef LISP_FEATURE_SB_THREAD
628
#ifdef LISP_FEATURE_SB_THREAD
629
    for(i = 0; i < (dynamic_values_bytes / sizeof(lispobj)); i++)
629
    for(i = 0; i < (dynamic_values_bytes / sizeof(lispobj)); i++)
630
        per_thread->dynamic_values[i] = NO_TLS_VALUE_MARKER_WIDETAG;
630
        per_thread->dynamic_values[i] = NO_TLS_VALUE_MARKER_WIDETAG;
631
    if (all_threads == 0) {
631
    if (all_threads == 0) {
632
      /* FIXME: Should nobody find it necessary to start a slightly older core
633
         than expected by the C runtime (a core in which Lisp did not perform
634
         these initializations) we can remove everything in this 'if' block */
632
        if(SymbolValue(FREE_TLS_INDEX,0)==UNBOUND_MARKER_WIDETAG) {
635
        if(SymbolValue(FREE_TLS_INDEX,0)==UNBOUND_MARKER_WIDETAG) {
633
            SetSymbolValue(FREE_TLS_INDEX,tls_index_start << WORD_SHIFT,0);
636
            SetSymbolValue(FREE_TLS_INDEX,tls_index_start << WORD_SHIFT,0);
634
            SetSymbolValue(TLS_INDEX_LOCK,make_fixnum(0),0);
637
            SetSymbolValue(TLS_INDEX_LOCK,make_fixnum(0),0);
635
        }
638
        }
636
#define STATIC_TLS_INIT(sym,field) \
639
#define STATIC_TLS_INIT(sym,field) \
637
  ((struct symbol *)(sym-OTHER_POINTER_LOWTAG))->tls_index= \
640
        if (SYMBOL(sym)->tls_index != (THREAD_SLOT_OFFSET_WORDS(field) << WORD_SHIFT)) { \
638
  (THREAD_SLOT_OFFSET_WORDS(field) << WORD_SHIFT)
641
          if (SYMBOL(sym)->tls_index == 0) \
642
            SYMBOL(sym)->tls_index = (THREAD_SLOT_OFFSET_WORDS(field) << WORD_SHIFT); \
643
          else lose(#sym " TLS index is wrong"); }
639
644
640
        STATIC_TLS_INIT(BINDING_STACK_START,binding_stack_start);
645
        STATIC_TLS_INIT(BINDING_STACK_START,binding_stack_start);
641
#ifdef BINDING_STACK_POINTER
646
#ifdef BINDING_STACK_POINTER
642
        STATIC_TLS_INIT(BINDING_STACK_POINTER,binding_stack_pointer);
647
        STATIC_TLS_INIT(BINDING_STACK_POINTER,binding_stack_pointer);
643
#endif
648
#endif

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks