poke-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] ios: track sub IOS devices


From: Mohammad-Reza Nabipoor
Subject: Re: [PATCH 1/2] ios: track sub IOS devices
Date: Sun, 25 Sep 2022 21:46:55 +0330

Hi Jose.

On Sun, Sep 25, 2022 at 01:07:11PM +0200, Jose E. Marchesi wrote:
> >  # gnulib modules used in libpoke/.
> >  libpoke_modules="
> > +  array-list
> 
> I'm not a big fan of container-like pre-written data structures unless
> there is certain amount of complexity involved, like handling duplicates
> and the like.
> 
> Since duplicated values are not a concern here, it seems to me that
> io->sub_devs is simple enough to be implemented as an array of pointers
> reallocated whenever needed.  What do you think about that?
> 


Yes, it is that simple.  But I thought maybe reusing components from 
Gnulib is a better approach.
But, OK, I'll implement it without using `array-list'.


> > [...]
> 
> > diff --git a/libpoke/ios.h b/libpoke/ios.h
> > index a942c43f..478cf030 100644
> > --- a/libpoke/ios.h
> > +++ b/libpoke/ios.h
> > @@ -366,4 +366,9 @@ struct ios_dev_if *ios_foreign_iod (void);
> >  struct ios_dev_if;
> >  int ios_register_foreign_iod (struct ios_dev_if *iod_if);
> >  
> > +/* **************** Sub IO space **************** */
> > +
> > +void ios_sub_claim (ios ios, void *sub_dev);
> > +void ios_sub_unclaim (ios ios, void *sub_dev);
> > +
> >  #endif /* ! IOS_H */
> 
> This interface is gonna need documentation in ios.h: what ios_sub_claim
> does and what ios_sub_unclaim does.
> 

I forgot to put comments there :)



Regards,
Mohammad-Reza



reply via email to

[Prev in Thread] Current Thread [Next in Thread]