void alarm_handler(int sig, mcontext_t *mc) { int enabled; enabled = signals_enabled; if (!signals_enabled) { signals_pending |= SIGVTALRM_MASK; return; } block_signals(); real_alarm_handler(mc); set_signals(enabled); }
void alarm_handler(ARCH_SIGHDLR_PARAM) { struct sigcontext *sc; int enabled; ARCH_GET_SIGCONTEXT(sc, sig); enabled = signals_enabled; if(!signals_enabled){ if(sig == SIGVTALRM) pending |= SIGVTALRM_MASK; else pending |= SIGALRM_MASK; return; } block_signals(); real_alarm_handler(sig, sc); set_signals(enabled); }