Signalling a process from a INTR_FAST handler

Scott scottl at
Sun Feb 20 07:10:12 PST 2005

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);
>>	}
>>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.


More information about the freebsd-hackers mailing list