Ignore:
Timestamp:
Feb 12, 2008, 3:02:15 PM (12 years ago)
Author:
gb
Message:

get impurify() working on x86-64.

File:
1 edited

Legend:

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

    r8471 r8475  
    157157  area *a = active_dynamic_area;
    158158  Boolean egc_was_enabled = (a->older != NULL);
     159 
    159160  natural gc_previously_deferred = gc_deferred;
    160161
     
    219220      full_gc_deferred = 0;
    220221    }
    221     if (selector & GC_TRAP_FUNCTION_PURIFY) {
    222       purify_from_xp(xp, 0L);
    223       gc_from_xp(xp, 0L);
    224     }
    225     if (selector & GC_TRAP_FUNCTION_SAVE_APPLICATION) {
    226       OSErr err;
    227       extern OSErr save_application(unsigned);
    228       area *vsarea = tcr->vs_area;
     222    if (selector > GC_TRAP_FUNCTION_GC) {
     223      if (selector & GC_TRAP_FUNCTION_IMPURIFY) {
     224        impurify_from_xp(xp, 0L);
     225        /*        nrs_GC_EVENT_STATUS_BITS.vcell |= gc_integrity_check_bit; */
     226        gc_from_xp(xp, 0L);
     227        release_readonly_area();
     228      }
     229      if (selector & GC_TRAP_FUNCTION_PURIFY) {
     230        purify_from_xp(xp, 0L);
     231        gc_from_xp(xp, 0L);
     232      }
     233      if (selector & GC_TRAP_FUNCTION_SAVE_APPLICATION) {
     234        OSErr err;
     235        extern OSErr save_application(unsigned);
     236        area *vsarea = tcr->vs_area;
    229237       
    230       nrs_TOPLFUNC.vcell = *((LispObj *)(vsarea->high)-1);
    231       err = save_application(arg);
    232       if (err == noErr) {
    233         _exit(0);
     238        nrs_TOPLFUNC.vcell = *((LispObj *)(vsarea->high)-1);
     239        err = save_application(arg);
     240        if (err == noErr) {
     241          _exit(0);
     242        }
     243        fatal_oserr(": save_application", err);
    234244      }
    235       fatal_oserr(": save_application", err);
    236     }
    237     switch (selector) {
    238     case GC_TRAP_FUNCTION_SET_HONS_AREA_SIZE:
    239       xpGPR(xp, Iimm0) = 0;
    240       break;
    241     case GC_TRAP_FUNCTION_FREEZE:
    242       a->active = (BytePtr) align_to_power_of_2(a->active, log2_page_size);
    243       tenured_area->static_dnodes = area_dnode(a->active, a->low);
    244       xpGPR(xp, Iimm0) = tenured_area->static_dnodes << dnode_shift;
    245       break;
    246     default:
    247       break;
     245      switch (selector) {
     246      case GC_TRAP_FUNCTION_SET_HONS_AREA_SIZE:
     247        xpGPR(xp, Iimm0) = 0;
     248        break;
     249      case GC_TRAP_FUNCTION_FREEZE:
     250        a->active = (BytePtr) align_to_power_of_2(a->active, log2_page_size);
     251        tenured_area->static_dnodes = area_dnode(a->active, a->low);
     252        xpGPR(xp, Iimm0) = tenured_area->static_dnodes << dnode_shift;
     253        break;
     254      default:
     255        break;
     256      }
    248257    }
    249258    if (egc_was_enabled) {
Note: See TracChangeset for help on using the changeset viewer.