1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>kthread_should_park</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="ch01s07.html" title="Internal Functions"><link rel="prev" href="API-kthread-should-stop.html" title="kthread_should_stop"><link rel="next" href="API-kthread-freezable-should-stop.html" title="kthread_freezable_should_stop"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">kthread_should_park</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-kthread-should-stop.html">Prev</a> </td><th width="60%" align="center">Internal Functions</th><td width="20%" align="right"> <a accesskey="n" href="API-kthread-freezable-should-stop.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-kthread-should-park"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>kthread_should_park — 
2     should this kthread park now?
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">bool <b class="fsfunc">kthread_should_park </b>(</code></td><td> <var class="pdparam">void</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.3.8.28.5"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>void</code></em></span></dt><dd><p>
4     no arguments
5    </p></dd></dl></div></div><div class="refsect1"><a name="id-1.3.8.28.6"></a><h2>Description</h2><p>
6   </p><p>
7
8   When someone calls <code class="function"><a class="link" href="API-kthread-park.html" title="kthread_park">kthread_park</a></code> on your kthread, it will be woken
9   and this will return true.  You should then do the necessary
10   cleanup and call <code class="function">kthread_parkme</code>
11   </p><p>
12
13   Similar to <code class="function"><a class="link" href="API-kthread-should-stop.html" title="kthread_should_stop">kthread_should_stop</a></code>, but this keeps the thread alive
14   and in a park position. <code class="function"><a class="link" href="API-kthread-unpark.html" title="kthread_unpark">kthread_unpark</a></code> <span class="quote">“<span class="quote">restarts</span>”</span> the thread and
15   calls the thread function again.
16</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-kthread-should-stop.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch01s07.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-kthread-freezable-should-stop.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">kthread_should_stop</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">kthread_freezable_should_stop</span></td></tr></table></div></body></html>
17