`module_exit()` `include/linux/init.h`
Prev | Chapter 6. Common Routines | Next

## `module_exit()` `include/linux/init.h`

This macro defines the function to be called at module removal time (or never, in the case of the file compiled into the kernel). It will only be called if the module usage count has reached zero. This function can also sleep, but cannot fail: everything must be cleaned up by the time it returns.

Note that this macro is optional: if it is not present, your module will not be removable (except for 'rmmod -f').

Prev | Up | Next
`__initcall()`/`module_init()` `include/linux/init.h` | Home | `try_module_get()`/`module_put()` `include/linux/module.h`