[libcamera-devel] [PATCH v3 06/17] py: Use UniqueFD

Jacopo Mondi jacopo at jmondi.org
Thu Aug 18 16:51:10 CEST 2022


On Thu, Aug 18, 2022 at 05:43:46PM +0300, Tomi Valkeinen wrote:
> On 18/08/2022 17:23, Jacopo Mondi wrote:
> > Hi Tomi
> >
> > On Fri, Jul 01, 2022 at 11:45:10AM +0300, Tomi Valkeinen wrote:
> > > Use UniqueFD to automate the eventfd lifetime management.
> > >
> >
> > Here you go :)
> >
> > Can you squash with the previous patch  ?
>
> No, I don't think it's a good idea to squash changes like this. The point of
> the previous patch was to convert the existing code to PyCameraManager. I
> don't do any changes there that are not needed.
>
> Squashing this, EFD_CLOEXEC and the mutex change would hide these changes
> inside the large refactoring done in the previous patch.
>

You'reintroducing a new class, and then patching it on top.
I understand you have moved existing code inside that class, but it's
a new component.

Anyway, converting to use UniqueFD + EFD_CLOEXEC (or even better the
one liner eventfd_ = UniqueFD(eventfd(...));) can be made one change.

Anway, it's a minor thing, up to you

>  Tomi


More information about the libcamera-devel mailing list