Changeset 5973


Ignore:
Timestamp:
Mar 2, 2007, 4:05:35 AM (18 years ago)
Author:
Gary Byers
Message:

Try to handle two more cases of consus-interruptus.

File:
1 edited

Legend:

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

    r5965 r5973  
    14861486    if ((state == ID_unrecognized_alloc_instruction) ||
    14871487        ((state == ID_set_allocptr_header_instruction) &&
    1488          (allocptr_tag == fulltag_cons))) {
    1489       Bug(NULL, "Can't determine state of thread 0x%lx, interrupted during memory allocation", tcr);
     1488         (allocptr_tag != fulltag_misc))) {
     1489      Bug(xp, "Can't determine state of thread 0x%lx, interrupted during memory allocation", tcr);
    14901490    }
    14911491    switch(state) {
     
    15111511      if (interrupt_displacement == NULL) {
    15121512        xpGPR(xp,Iallocptr) = VOID_ALLOCPTR - disp;
     1513        tcr->save_allocptr = (void *)(VOID_ALLOCPTR - disp);
    15131514      } else {
    15141515        /* Back out, and tell the caller how to resume the allocation attempt */
    15151516        *interrupt_displacement = disp;
     1517        xpGPR(xp,Iallocptr) = VOID_ALLOCPTR;
     1518        tcr->save_allocptr += disp;
    15161519        xpPC(xp) -= (sizeof(branch_around_alloc_trap_instruction)+
    15171520                     sizeof(compare_allocptr_reg_to_tcr_save_allocbase_instruction) +
     
    15451548                       sizeof(load_allocptr_reg_from_tcr_save_allocptr_instruction));
    15461549          xpGPR(xp,Iallocptr) = VOID_ALLOCPTR;
    1547           tcr->save_allocptr = (void *)(VOID_ALLOCPTR-disp);
     1550          if (interrupt_displacement) {
     1551            *interrupt_displacement = disp;
     1552            tcr->save_allocptr += disp;
     1553          } else {
     1554            tcr->save_allocptr = (void *)(VOID_ALLOCPTR-disp);
     1555          }
    15481556        }
    15491557      }
Note: See TracChangeset for help on using the changeset viewer.