cdefpriv usage (was: bsd versus linux device drivers)

Kostik Belousov kostikbel at gmail.com
Sun Sep 14 13:18:15 UTC 2008


On Sat, Sep 13, 2008 at 09:51:17PM -0700, vehemens wrote:
> On Thursday 11 September 2008 10:13:34 am vehemens wrote:
> ...
> > Looks like the ioctl get randomly fails with ENOENT.
> 
> Turned out to be a bug in my code.
> 
> > Something else is going on with mmap get which fails with EBADF almost all
> > of the time..
> 
> Looking at the man page and code, it appears that cdevpriv has not been 
> implemented for mmap.
Yes, d_mmap is mostly called from PF# context, where no associated
fp is available. This is fixable, but somewhat ugly.

> 
> I'm still somewhat confused about what cdevpriv is supposed to do.  I was 
> after per open private data association, and the code appears to only 
> implement per thread open private data association.

It is "after per open".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20080914/7bbd96d1/attachment.pgp


More information about the freebsd-current mailing list