Signalling a process from a INTR_FAST handler

Daniel O'Connor doconnor at gsoft.com.au
Sat Feb 19 23:36:25 PST 2005


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.

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20050220/aee5b220/attachment.bin


More information about the freebsd-hackers mailing list