/[cmucl]/src/lisp/gencgc.c
ViewVC logotype

Diff of /src/lisp/gencgc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.39 by toy, Mon Sep 29 16:29:03 2003 UTC revision 1.40 by toy, Wed Oct 8 16:49:34 2003 UTC
# Line 2173  void scavenge_interrupt_contexts(void) Line 2173  void scavenge_interrupt_contexts(void)
2173    int i, index;    int i, index;
2174    struct sigcontext *context;    struct sigcontext *context;
2175    
2176    #ifdef PRINTNOISE
2177      printf("Scavenging interrupt contexts ...\n");
2178    #endif
2179    
2180    index = fixnum_value(SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX));    index = fixnum_value(SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX));
2181    
2182  #if defined(DEBUG_PRINT_CONTEXT_INDEX)  #if defined(DEBUG_PRINT_CONTEXT_INDEX)
# Line 6172  static void write_protect_generation_pag Line 6176  static void write_protect_generation_pag
6176  }  }
6177    
6178    
6179    static void
6180    scavenge_interrupt_handlers()
6181    {
6182      int i;
6183    
6184    #ifdef PRINTNOISE
6185      printf("Scavenging interrupt handlers (%d bytes) ...\n",
6186             sizeof(interrupt_handlers));
6187    #endif
6188    
6189      for (i = 0; i < NSIG; i++)
6190        {
6191          union interrupt_handler handler = interrupt_handlers[i];
6192          if (handler.c != (void (*) (HANDLER_ARGS)) SIG_IGN
6193              && handler.c != (void (*) (HANDLER_ARGS)) SIG_DFL)
6194            scavenge((lispobj *) (interrupt_handlers + i), 1);
6195        }
6196    }
6197    
6198    #ifndef x86
6199    static void
6200    scavenge_control_stack()
6201    {
6202        unsigned long control_stack_size;
6203    
6204        control_stack_size = current_control_stack_pointer - control_stack;
6205    
6206    #ifdef PRINTNOISE
6207        printf("Scavenging the control stack (%d bytes) ...\n",
6208               control_stack_size * sizeof(lispobj));
6209    #endif
6210    
6211        scavenge(control_stack, control_stack_size);
6212    
6213    #ifdef PRINTNOISE
6214        printf("Done scavenging the control stack.\n");
6215    #endif
6216    }
6217    #endif
6218    
6219  /*  /*
6220   * Garbage collect a generation. If raise is 0 the remains of the   * Garbage collect a generation. If raise is 0 the remains of the
6221   * generation are not raised to the next generation.   * generation are not raised to the next generation.
# Line 6279  garbage_collect_generation (int generati Line 6323  garbage_collect_generation (int generati
6323    
6324  #ifndef i386  #ifndef i386
6325    /*    /*
6326     * If not x86, scavenge the interrupt context(s) and the control     * If not x86, we need to scavenge the interrupt context(s) and the
6327     * stack.     * control stack.
6328     */     */
 #ifdef PRINTNOISE  
   printf("Scavenging interrupt contexts ...\n");  
 #endif  
6329    scavenge_interrupt_contexts();    scavenge_interrupt_contexts();
6330  #ifdef PRINTNOISE    scavenge_control_stack();
   printf("Scavenging interrupt handlers (%d bytes) ...\n",  
          sizeof(interrupt_handlers));  
 #endif  
   scavenge((lispobj *) interrupt_handlers,  
            sizeof(interrupt_handlers) / sizeof(lispobj));  
   {  
     unsigned long control_stack_size;  
   
     control_stack_size = current_control_stack_pointer - control_stack;  
 #ifdef PRINTNOISE  
     printf("Scavenging the control stack (%d bytes) ...\n",  
            control_stack_size * sizeof(lispobj));  
 #endif  
     scavenge(control_stack, control_stack_size);  
 #ifdef PRINTNOISE  
     printf("Done scavenging the control stack.\n");  
 #endif  
   }  
   
 #else /* x86 */  
   for (i = 0; i < NSIG; i++) {  
     union interrupt_handler handler = interrupt_handlers[i];  
     if (handler.c != (void (*) (HANDLER_ARGS)) SIG_IGN  
         && handler.c != (void (*) (HANDLER_ARGS)) SIG_DFL)  
       scavenge((lispobj *) (interrupt_handlers + i), 1);  
   }  
6331  #endif  #endif
6332    
6333      scavenge_interrupt_handlers();
6334    
6335  #ifdef PRINTNOISE  #ifdef PRINTNOISE
6336    printf("Scavenging the binding stack (%d bytes) ...\n",    printf("Scavenging the binding stack (%d bytes) ...\n",

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.5