Skip to content

Commit 7c4e64e

Browse files
committed
Proofread
1 parent 55aee85 commit 7c4e64e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

lkmpg.tex

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ \subsection{Before We Begin}
171171
If difficulties arise when loading the modules due to versioning errors, consider compiling a kernel with modversioning turned off.
172172

173173
\item Using X Window System.
174-
\label{sec:using_x}
175174
It is highly recommended to extract, compile, and load all the examples discussed in this guide from a console.
176175
Working on these tasks within the X Window System is discouraged.
177176

@@ -1710,14 +1709,16 @@ \section{Replacing Print Macros}
17101709
\label{sec:print_macros}
17111710
\subsection{Replacement}
17121711
% FIXME: cross-reference
1713-
In Section \ref{sec:using_x}, I said that X Window System and kernel module programming do not mix.
1714-
That is true for developing kernel modules.
1715-
But in actual use, you want to be able to send messages to whichever tty the command to load the module came from.
1712+
In Section \ref{sec:preparation}, it was noted that the X Window System and kernel module programming are not conducive to integration.
1713+
This remains valid during the development of kernel modules.
1714+
However, in practical scenarios, the necessity emerges to relay messages to the tty (teletype) originating the module load command.
17161715

1717-
"tty" is an abbreviation of \emph{teletype}: originally a combination keyboard-printer used to communicate with a Unix system, and today an abstraction for the text stream used for a Unix program, whether it is a physical terminal, an xterm on an X display, a network connection used with ssh, etc.
1716+
The term ``tty'' originates from \emph{teletype}, which initially referred to a combined keyboard-printer for Unix system communication.
1717+
Today, it signifies a text stream abstraction employed by Unix programs, encompassing physical terminals,
1718+
xterms in X displays, and network connections like SSH.
17181719

1719-
The way this is done is by using current, a pointer to the currently running task, to get the current task's tty structure.
1720-
Then, we look inside that tty structure to find a pointer to a string write function, which we use to write a string to the tty.
1720+
To achieve this, the ``current'' pointer is leveraged to access the active task's tty structure.
1721+
Within this structure lies a pointer to a string write function, facilitating the string's transmission to the tty.
17211722

17221723
\samplec{examples/print_string.c}
17231724

0 commit comments

Comments
 (0)