/* * BUG: * The AC must not accept interrupts while in the kernel, * or we must be prepared for nesting them, which we are not. * This is important for note handling, because postnote() * assumes that it's ok to send an IPI to an AC, no matter its * state. The /proc interface also assumes that. * */ void intrac(Proc *p) { Mach *ac; ac = p->ac; if(ac == nil){ DBG("intrac: Proc.ac is nil. no ipi sent.\n"); return; } /* * It's ok if the AC gets idle in the mean time. */ DBG("intrac: ipi to cpu%d\n", ac->machno); apicipi(ac->apicno); }
static void waitnotstale(Mach *mp, PmcCtr *p) { PmcWait *w; w = newpmcw(); w->next = p->wq; p->wq = w; incref(w); iunlock(&mp->pmclock); apicipi(mp->apicno); if(waserror()){ pmcwclose(w); nexterror(); } sleep(&w->r, notstale, p); poperror(); pmcwclose(w); }