Contents
What is module stacking?
Stacking just means that some module calls functions defined in another module. There is an example right on the page you cite. According to the figure, lp is a driver for printers on parallel ports.
How are modules loaded in Linux?
In Linux, all modules end with the . ko extension, and they are normally loaded automatically as the hardware is detected at system boot. However a system administrator can manage the modules using certain commands.
What is load module?
A load module is an executable program stored in a partitioned data set program library. Creating a load module to execute only, will require that you use a batch loader or program management loader. Once a program is loaded, control is passed to it, with a value in the base register.
How is module stacking implemented in the Linux kernel?
Module stacking is implemented in the mainstream kernel sources as well: the msdos filesystem relies on symbols exported by the fat module, and each input USB device module stacks on the usbcore and input modules. Module stacking is useful in complex projects.
Which is an example of a Linux driver?
For example, the video-for-linux set of drivers is split into a generic module that exports symbols used by lower-level device drivers for specific hardware. According to your setup, you load the generic video module and the specific module for your installed hardware.
What are the functions of a module in Linux?
This module defines two functions, one to be invoked when the module is loaded into the kernel ( hello_init) and one for when the module is removed ( hello_exit ). The module_init and module_exit lines use special kernel macros to indicate the role of these two functions.
How is the printk function defined in Linux?
Another special macro ( MODULE_LICENSE) is used to tell the kernel that this module bears a free license; without such a declaration, the kernel complains when the module is loaded. The printk function is defined in the Linux kernel and made available to modules; it behaves similarly to the standard C library function printf.