dumb KSE question

Terry Lambert tlambert2 at mindspring.com
Mon Jul 14 10:55:00 PDT 2003


Petri Helenius wrote:
> The cv I´m talking about would be signaled by a device driver which
> shares some memory with the netgraph device node and the question
> is about if in the ng_device like thing I can have the d_ioctl_t block
> on the cv.

People always want to do this sort of thing, but it's a really bogus
thing to want to do.  The problem with it is that you are crossing a
protection domain, and, in doing that, all bets are off, in terms of
allowable locking, etc..  The big issue you are going to hit is that
you will deadlock.

The proper thing to do is perform a blocking operation on the device
itself, and unblock it when the condition is true in order to signal
the user space process.

-- Terry


More information about the freebsd-threads mailing list