[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about EXPORT_SYMBOL
On Mon, 19 Feb 2001, Gigi Sullivan wrote:
> Aiee :)
>
> Hello!
>
> On Mon, Feb 19, 2001 at 02:51:38PM +0000, John Levon wrote:
> > You can either add MOD_INC/DEC_USE_COUNTs to your system call code (although this will still
> > leave a very tiny race window), or make the module not unloadable by using can_unload().
>
> I saw that can_unload is a function pointer of the module structure, but
> how can I play with this?
>
> Can I set this function pointer to point to a my-own routine (implemented
> inside the module)? How?
>
> BTW, which are the advantages of using can_unload?
>
> bye bye && Thanks!
>
> -- gg sullivan
>
>
Read the documentation in the 2.4.1ac series kernels (in the DocBook directory).
Basically your own "can_unload" routine should return 0 if the module is currently unloadable
or -EBUSY if it can't
john
--
"Allocation is a fatal error."
- me, cpd_util.c. Never document at 4AM
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.surriel.com/kernelnewbies.shtml