Re: RFC: modules and 2.5

Jeff Garzik (jgarzik@mandrakesoft.com)
Sat, 07 Jul 2001 10:12:28 -0400


Rusty Russell wrote:
>
> In message <3B415489.77425364@mandrakesoft.com> you write:
> > A couple things that would be nice for 2.5 is
> > - let MOD_INC_USE_COUNT work even when module is built into kernel, and
> > - let THIS_MODULE exist and be valid even when module is built into
> > kernel
>
> Hi Jeff,
>
> What use are module use counts, if not used to prevent unloading?

IMHO you should be free to bump the module reference count up and down
as you wish, and be able to read the module reference count.

If you make that assumption, then it becomes possible to use the module
ref count as an internal reference counter, for device opens or
something like that.

In i810_rng.c it eliminated the need for an additional reference
count... until I attempted to compile it into the kernel instead of as a
module, for the first time :)

Jeff

-- 
Jeff Garzik      | A recent study has shown that too much soup
Building 1024    | can cause malaise in laboratory mice.
MandrakeSoft     |
-
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/