Date: Sun, 20 Feb 2005 08:08:11 -0700 From: Scott <scottl@samsco.org> To: "Daniel O'Connor" <doconnor@gsoft.com.au> Cc: Peter Jeremy <PeterJeremy@optushome.com.au> Subject: Re: Signalling a process from a INTR_FAST handler Message-ID: <4218A7DB.1050705@samsco.org> In-Reply-To: <200502201805.43307.doconnor@gsoft.com.au> References: <20050220054251.GB28983@cirb503493.alcatel.com.au> <200502201805.43307.doconnor@gsoft.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Daniel O'Connor wrote: > On Sun, 20 Feb 2005 16:12, Peter Jeremy wrote: > >>I have a hardware interrupt handler that has to forward a signal to >>userland and that I'd like to mark INTR_FAST. AFAIK, the normal way >>to forward a signal is: >> if ((p = pfind(sc->pid_to_signal)) != NULL) { >> psignal(p, SIGUSR2); >> PROC_UNLOCK(p); >> } >> >>But pfind(9) does a PROC_LOCK() which implies it can sleep and therefore >>can't be used by an INTR_FAST handler. >> >>Firstly, am I correct? If so, is there an alternative approach I can use? > > > I think you are, and I think the only way to do it is to schedule another > kernel [heavy] thread to do the wakeup. > You can shift the operation off to a fast taskqueue. This assumes that latency between the interrupt and the signal delivery is not critical. Scott
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4218A7DB.1050705>