Changeset 11741


Ignore:
Timestamp:
Feb 16, 2009, 1:43:59 PM (10 years ago)
Author:
gb
Message:

arbstack_suspend_resume_handler(): if we don't have a tcr, don't
create one. (We're pretty clearly on the foreign stack in that
case, so just run suspend_resume_handler without any stack switch.)

File:
1 edited

Legend:

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

    r11659 r11741  
    20052005#endif
    20062006  TCR *tcr = get_interrupt_tcr(false);
    2007   area *vs = tcr->vs_area;
    2008   BytePtr current_sp = (BytePtr) current_stack_pointer();
    2009 
    2010   if ((current_sp >= vs->low) &&
    2011       (current_sp < vs->high)) {
    2012     handle_signal_on_foreign_stack(tcr,
    2013                                    suspend_resume_handler,
    2014                                    signum,
    2015                                    info,
    2016                                    context,
    2017                                    (LispObj)__builtin_return_address(0)
     2007  if (tcr != NULL) {
     2008    area *vs = tcr->vs_area;
     2009    BytePtr current_sp = (BytePtr) current_stack_pointer();
     2010   
     2011    if ((current_sp >= vs->low) &&
     2012        (current_sp < vs->high)) {
     2013      return
     2014        handle_signal_on_foreign_stack(tcr,
     2015                                       suspend_resume_handler,
     2016                                       signum,
     2017                                       info,
     2018                                       context,
     2019                                       (LispObj)__builtin_return_address(0)
    20182020#ifdef DARWIN_GS_HACK
    2019                                    ,gs_was_tcr
    2020 #endif
    2021                                    );
    2022   } else {
    2023     /* If we're not on the value stack, we pretty much have to be on
    2024        the C stack.  Just run the handler. */
     2021                                       ,gs_was_tcr
     2022#endif
     2023                                       );
     2024    } else {
     2025      /* If we're not on the value stack, we pretty much have to be on
     2026         the C stack.  Just run the handler. */
    20252027#ifdef DARWIN_GS_HACK
    2026     if (gs_was_tcr) {
    2027       set_gs_address(tcr);
    2028     }
    2029 #endif
    2030     suspend_resume_handler(signum, info, context);
    2031   }
     2028      if (gs_was_tcr) {
     2029        set_gs_address(tcr);
     2030      }
     2031#endif
     2032    }
     2033  }
     2034  suspend_resume_handler(signum, info, context);
    20322035}
    20332036
Note: See TracChangeset for help on using the changeset viewer.