tech-kern archive

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

Re: kcmp(2)




> On Jul 18, 2023, at 2:57 PM, Mouse <mouse%Rodents-Montreal.ORG@localhost> wrote:
> 
>>> What does Mesa use kcmp(2) for?
>> Working out whether two device handles are to the same DRM device.
> 
>>> Is there another way to accomplish what Mesa is trying to use it for?
>> I don't know of one.
> 
> Is fstat() plus checking st_rdev (and possibly other fields)
> insufficient?

That *might* work in this particular case, but it would not work for e.g. a cloning device where you get additional descriptors via dup() or whatever.

-- thorpej



Home | Main Index | Thread Index | Old Index