Changeset 8785


Ignore:
Timestamp:
Mar 14, 2008, 6:07:31 PM (11 years ago)
Author:
andreas
Message:

Properly set up TCR.

Location:
branches/win64/lisp-kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/win64/lisp-kernel/thread_manager.c

    r8696 r8785  
    724724  Caller must hold the area_lock.
    725725*/
    726 #ifdef WINDOWS
    727 TCR *
    728 new_tcr(natural vstack_size, natural tstack_size)
    729 {
    730 }
    731 #else
    732726TCR *
    733727new_tcr(natural vstack_size, natural tstack_size)
     
    738732  area *a;
    739733  int i;
     734#ifndef WINDOWS
    740735  sigset_t sigmask;
    741736
    742737  sigemptyset(&sigmask);
    743738  pthread_sigmask(SIG_SETMASK,&sigmask, NULL);
     739#endif
     740
    744741#ifdef HAVE_TLS
    745742  TCR *tcr = &current_tcr;
     
    795792  }
    796793  TCR_INTERRUPT_LEVEL(tcr) = (LispObj) (-1<<fixnum_shift);
     794#ifndef WINDOWS
    797795  tcr->shutdown_count = PTHREAD_DESTRUCTOR_ITERATIONS;
     796#endif
    798797  return tcr;
    799798}
    800 #endif
    801799
    802800void
  • branches/win64/lisp-kernel/x86-subprims64.s

    r8602 r8785  
    8282/* "reset" itself or start running lisp code.  Both of these arguments */
    8383/* are currently ignored (the TCR is maintained in a segment register and */
    84 /*  the reset/panic code doesn't work ...) */
     84/*  the reset/panic code doesn't work ...), except on Windows, where we use */
     85/* the first arg to set up the TCR register */ 
    8586   
    8687_exportfn(C(start_lisp))
     
    9596        __(push %csave5)
    9697        __(push %csave6)
    97         /* FIXME: set up %rcontext_reg a.k.a. r11 */
     98        __(movq %carg0,%rcontext_reg)
    9899        __endif
    99100        __ifdef([DARWIN_GS_HACK])
Note: See TracChangeset for help on using the changeset viewer.