Date: Sun, 20 Feb 2005 18:05:36 +1030 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: freebsd-hackers@freebsd.org Cc: Peter Jeremy <PeterJeremy@optushome.com.au> Subject: Re: Signalling a process from a INTR_FAST handler Message-ID: <200502201805.43307.doconnor@gsoft.com.au> In-Reply-To: <20050220054251.GB28983@cirb503493.alcatel.com.au> References: <20050220054251.GB28983@cirb503493.alcatel.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart3245070.EYrDeGpbY3 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 =3D pfind(sc->pid_to_signal)) !=3D 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=20 kernel [heavy] thread to do the wakeup. =2D-=20 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 --nextPart3245070.EYrDeGpbY3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBCGD3P5ZPcIHs/zowRApNPAJ4osMseZ+cUq/nMBhhbnbmiiuqXSACeOTa0 xWcg0/3Dt4vC4bk4T5GehXQ= =pRNJ -----END PGP SIGNATURE----- --nextPart3245070.EYrDeGpbY3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502201805.43307.doconnor>