Skip to content

Commit

Permalink
Fix typo (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvletter authored May 5, 2024
1 parent 0d43408 commit 0a27a01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lkmpg.tex
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ \subsection{How modules begin and end}
informing the kernel of the module's functionalities and preparing the kernel to utilize the module's functions when necessary.
After performing these tasks, the entry function returns, and the module remains inactive until the kernel requires its code.

All modules conclude by invoking either \cpp|cleanup_module| or a function specified through the \cpp|module_exit |call.
All modules conclude by invoking either \cpp|cleanup_module| or a function specified through the \cpp|module_exit| call.
This serves as the module's exit function, reversing the actions of the entry function by unregistering the previously registered functionalities.

It is mandatory for every module to have both an entry and an exit function.
Expand All @@ -729,7 +729,7 @@ \subsection{Functions available to modules}
Programmers use functions they do not define all the time.
A prime example of this is \cpp|printf()|.
You use these library functions which are provided by the standard C library, libc.
The definitions for these functions do not actually enter your program until the linking stage, which insures that the code (for \cpp|printf()| for example) is available, and fixes the call instruction to point to that code.
The definitions for these functions do not actually enter your program until the linking stage, which ensures that the code (for \cpp|printf()| for example) is available, and fixes the call instruction to point to that code.

Kernel modules are different here, too. In the hello world example, you might have noticed that we used a function, \cpp|pr_info()| but did not include a standard I/O library.
That is because modules are object files whose symbols get resolved upon running \sh|insmod| or \sh|modprobe|.
Expand Down

0 comments on commit 0a27a01

Please sign in to comment.