per file descriptor device driver data ?

Hans Petter Selasky hps at selasky.org
Fri May 29 12:48:08 UTC 2015


On 05/29/15 14:24, Luigi Rizzo wrote:
> Our current design uses devfs_set_cdevpriv() during the open()
> handler, but for some reason a subsequent devfs_get_cdevpriv(p)
> returns *p = NULL in additional threads created by the process
> that did the open().

Hi,

Are you sure it is the same file handle passed around, that the FD's 
were not cloned? The devfs_set_cdevpriv() is per "struct file" in the 
kernel from my knowledge.

--HPS


More information about the freebsd-current mailing list