[RFCv2][PATCH] flexible array implementation

Dave Hansen dave at linux.vnet.ibm.com
Wed Jul 22 08:02:35 PDT 2009


On Wed, 2009-07-22 at 15:09 +0800, Amerigo Wang wrote:
> On Tue, Jul 21, 2009 at 03:00:17PM -0700, Dave Hansen wrote:
> >+static inline int __nr_part_ptrs(void)
> 
> How about __nr_ptrs_in_part()?

That would be fine except it is the number of part pointers in the base.
I guess you're proving that I named it horribly. :)

> >+static int fa_index_inside_part(struct flex_array *fa, int element_nr)
> >+{
> >+	return (element_nr % __elements_per_part(fa->element_size));
> >+}
> >+
> >+static int offset_inside_part(struct flex_array *fa, int element_nr)
> 
> How about index_in_part()?

Yeah, I guess that's decent.  I'll go see how it feels when it gets
used.

-- Dave



More information about the Containers mailing list