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
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to