You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two main ways of running tasks: tasklets and work queues.
1902
1902
Tasklets are a quick and easy way of scheduling a single function to be run.
1903
-
For example, when triggered from an interrupt, whereas work queues are more complicated but also better suited to running multiple things in a sequence.
1903
+
For example, when triggered from an interrupt,
1904
+
whereas work queues are more complicated but also better suited to running multiple things in a sequence.
1904
1905
1905
-
It is possible that in future tasklets may be replaced by \textit{threaded irqs}.
1906
-
However, discussion about that has been ongoing since 2007 (\href{https://lwn.net/Articles/239633}{Eliminating tasklets}), so do not hold your breath.
1907
-
See the section \ref{sec:irq} if you wish to avoid the tasklet debate.
1906
+
It is possible that in future tasklets may be replaced by \textit{threaded IRQs}.
1907
+
However, discussion about that has been ongoing since 2007 (\href{https://lwn.net/Articles/239633}{Eliminating tasklets} and \href{https://lwn.net/Articles/960041/}{The end of tasklets}),
1908
+
so expecting immediate changes would be unwise.
1909
+
See the section \ref{sec:irq} for alternatives that avoid the tasklet debate.
1908
1910
1909
1911
\subsection{Tasklets}
1910
1912
\label{sec:tasklet}
1911
1913
Here is an example tasklet module.
1912
1914
The \cpp|tasklet_fn| function runs for a few seconds.
1913
-
In the meantime, execution of the \cpp|example_tasklet_init| function may continue to the exit point, depending on whether it is interrupted by \textbf{softirq}.
1915
+
In the meantime, execution of the \cpp|example_tasklet_init| function may continue to the exit point,
1916
+
depending on whether it is interrupted by \textbf{softirq}.
1914
1917
1915
1918
\samplec{examples/example_tasklet.c}
1916
1919
@@ -2014,7 +2017,7 @@ \subsection{Bottom Half}
2014
2017
\samplec{examples/bottomhalf.c}
2015
2018
2016
2019
\subsection{Threaded IRQ}
2017
-
2020
+
\label{sec:threaded_irq}
2018
2021
Threaded IRQ is a mechanism to organize both top-half and bottom-half of an IRQ at once.
2019
2022
A threaded IRQ splits the one handler in \cpp|request_irq()| into two: one for the top-half, the other for the bottom-half.
2020
2023
The \cpp|request_threaded_irq()| is the function for using threaded IRQs.
0 commit comments