DragonFly BSD
DragonFly kernel List (threaded) for 2012-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: devfs_get/set_cdevpriv functions from FreeBSD


From: Francois Tigeot <ftigeot@xxxxxxxxxxxx>
Date: Wed, 18 Jul 2012 13:53:17 +0200

On Tue, Jul 17, 2012 at 08:11:13AM +0000, Markus Pfeiffer wrote:
> 
> while porting drivers from FreeBSD some of us have stumbled over the functions
> devfs_get_cdevpriv and devfs_set_cdevpriv, which store some
> per-open-filedescriptor information for some devices.
> 
> I looked into the FreeBSD code and the implementation seems weird to me since
> they store the filedescriptor on syscall in their thread struct and the functions
> rely on that hidden state.
> 
> Question is now: Should we have similar functionality (i.e. per open
> filedescriptor "private" data) and if yes how to best implement that.

Have a look at our existing drm infrastructure; there is already some code
doing this (a direct replacement of the FreeBSD version).

-- 
Francois Tigeot



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]