Changeset 11551


Ignore:
Timestamp:
Dec 26, 2008, 2:49:51 AM (11 years ago)
Author:
gb
Message:

Not the bug I was looking for either, but un-botch some of the GC-state-saving
changes from a few weeks ago: save_application() is always run with the
EGC off, so make the caller pass an extra arg indicating its state as of
the time we trapped to it. Set G2_THRESHOLD global before writing image,
don't set G1_THRESHOLD twice.

Images built a few weeks ago have EGC off and misconfigured.

Location:
trunk/source/lisp-kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/image.c

    r11501 r11551  
    394394
    395395OSErr
    396 save_application(unsigned fd)
     396save_application(unsigned fd, Boolean egc_was_enabled)
    397397{
    398398  openmcl_image_file_header fh;
     
    462462    lisp_global(G0_THRESHOLD) = g0_area->threshold;
    463463    lisp_global(G1_THRESHOLD) = g1_area->threshold;
    464     lisp_global(G1_THRESHOLD) = g2_area->threshold;
    465     lisp_global(EGC_ENABLED) = (LispObj)(active_dynamic_area->older != NULL);
     464    lisp_global(G2_THRESHOLD) = g2_area->threshold;
     465    lisp_global(EGC_ENABLED) = (LispObj)egc_was_enabled;
    466466  }
    467467  /*
  • trunk/source/lisp-kernel/ppc-exceptions.c

    r11523 r11551  
    515515      if (selector & GC_TRAP_FUNCTION_SAVE_APPLICATION) {
    516516        OSErr err;
    517         extern OSErr save_application(unsigned);
     517        extern OSErr save_application(unsigned, Boolean);
    518518        TCR *tcr = TCR_FROM_TSD(xpGPR(xp, rcontext));
    519519        area *vsarea = tcr->vs_area;
    520520       
    521521        nrs_TOPLFUNC.vcell = *((LispObj *)(vsarea->high)-1);
    522         err = save_application(arg);
     522        err = save_application(arg, egc_was_enabled);
    523523        if (err == noErr) {
    524524          _exit(0);
  • trunk/source/lisp-kernel/x86-exceptions.c

    r11523 r11551  
    267267      if (selector & GC_TRAP_FUNCTION_SAVE_APPLICATION) {
    268268        OSErr err;
    269         extern OSErr save_application(unsigned);
     269        extern OSErr save_application(unsigned, Boolean);
    270270        area *vsarea = tcr->vs_area;
    271271
     
    274274#endif
    275275        nrs_TOPLFUNC.vcell = *((LispObj *)(vsarea->high)-1);
    276         err = save_application(arg);
     276        err = save_application(arg, egc_was_enabled);
    277277        if (err == noErr) {
    278278          _exit(0);
     
    13501350#endif
    13511351
    1352 #ifdef DARWIN
    1353 void
    1354 pseudo_signal_handler(int signum, siginfo_t *info, ExceptionInformation  *context, TCR *tcr, int old_valence)
    1355 {
    1356   sigset_t mask;
    1357 
    1358   sigfillset(&mask);
    1359 
    1360   pthread_sigmask(SIG_SETMASK,&mask,&(context->uc_sigmask));
    1361   signal_handler(signum, info, context, tcr, old_valence);
    1362 }
    1363 #endif
    13641352
    13651353
     
    23942382         instruction, then fall into the next case. */
    23952383      new_vector = xpGPR(xp,Iallocptr);
    2396       deref(new_vector,0) = xpGPR(xp,Iimm0);
     2384      deref(new_vector,0) =
     2385#ifdef X8664
     2386        xpGPR(xp,Iimm0)
     2387#else
     2388        xpMMXreg(xp,Imm0)
     2389#endif
     2390        ;
    23972391
    23982392      xpPC(xp) += sizeof(set_allocptr_header_instruction);
     
    31313125#endif
    31323126
    3133 #ifdef DARWIN_USE_PSEUDO_SIGRETURN
     3127
    31343128#define DARWIN_EXCEPTION_HANDLER signal_handler
    3135 #else
    3136 #define DARWIN_EXCEPTION_HANDLER pseudo_signal_handler
    3137 #endif
    31383129
    31393130
Note: See TracChangeset for help on using the changeset viewer.