Re: cdefpriv usage (was: bsd versus linux device drivers)

From: Kostik Belousov <kostikbel_at_gmail.com>
Date: Sun, 14 Sep 2008 16:18:09 +0300
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".

Received on Sun Sep 14 2008 - 11:18:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:35 UTC