Messages in this thread | ![/](/images/icornerl.gif) | | Date | Thu, 16 Jan 2003 17:04:16 -0800 | From | Greg KH <> | Subject | Re: [RFC] Migrating net/sched to new module interface |
| |
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/
| ![\](/images/icornerr.gif) |