Re: [RFC] Migrating net/sched to new module interface

From: Greg KH (greg@kroah.com)
Date: Thu Jan 16 2003 - 20:04:16 EST


On Fri, Jan 17, 2003 at 12:53:12AM +0100, Roman Zippel wrote:
> Hi,
>
> Werner Almesberger wrote:
>
> > > You can simplify this. All you need are the following simple functions:
> > >
> > > - void register();
> > > - void unregister();
> > > - int is_registered();
> > > - void inc_usecount();
> > > - void dec_usecount();
> > > - int get_usecount();
> >
> > I'm not sure if you, you're not changing the semantics.
>
> See above functions as primitives, which one can use to build any other
> resource management you want.

That same functionality is already present in a kobj for you to use,
instead of rolling your own resource management code. :)

(sorry, I couldn't help myself...)

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jan 23 2003 - 22:00:15 EST