On 06/09/07, Garrett D'Amore <[EMAIL PROTECTED]> wrote:
> (Obviously mac_alloc() here would return "mac_t *", but under the covers
> it is really allocating a whole mac_impl_t.  And mac_free() would be
> free()'ing a a whole mac_impl_t, though it is taking a mac_t as its
> argument.)
>
> If we want to pursue this course of action, I can put together a webrev
> with the changes... it will take me a while because there are a *lot* of
> drivers to change... but I want to get this change in *before* we make
> GLDv3 public.

FWIW, I find the current mac_register_t scheme ugly; I don't see why a
statically defined mac_register_t cannot simply be passed into
mac_register(). I don't see why we need separate allocator functions
there.
I also don't see that you can't break this race using reference
counting. There's no need for mac_unregister() to actually free the
mac_impl_t; it could just drop a ref. and the last man out frees.
Let's try not to complicate the interface because of implementation
artifacts.

  Paul

-- 
Paul Durrant
http://www.linkedin.com/in/pdurrant
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to