lkml.org 
[lkml]   [2015]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 01/17] Add ida and idr helper routines.
From
Date
On Tue, 2015-09-15 at 09:46 -0700, Lee Duncan wrote:
> Clients of the ida and idr index-management routines
> tend to use the same calling sequences much of the time,
> so this change adds helper functions for allocating and
> releasing indexes of either flavor, i.e. with or
> without pointer management.
>
> Inline functions added for idr:
> idr_get_index_in_range
> idr_get_index (in range 0,0)
> idr_put_index
> And for ida:
> ida_get_index
> ida_put_index

Every consumer of this I've seen seems to have the pattern of allocating
the ida and the protecting spinlock together. If that's the case, why
not move the spinlock into struct ida so it doesn't have to be
separately allocated and passed in to all the helpers?

Also, you need a cc of Tejun (added on this one) because he's the one
who last did significant work in ida/idr.

James




\
 
 \ /
  Last update: 2015-09-15 20:41    [W:0.124 / U:1.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site