1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>do_signal_stop</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-do-notify-parent-cldstop.html" title="do_notify_parent_cldstop"><link rel="next" href="API-do-jobctl-trap.html" title="do_jobctl_trap"></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">do_signal_stop</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-do-notify-parent-cldstop.html">Prev</a> </td><th width="60%" align="center">Internal Functions</th><td width="20%" align="right"> <a accesskey="n" href="API-do-jobctl-trap.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-do-signal-stop"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>do_signal_stop — 2 handle group stop for SIGSTOP and other stop signals 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">do_signal_stop </b>(</code></td><td>int <var class="pdparam">signr</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1107921012"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>signr</code></em></span></dt><dd><p> 4 signr causing group stop if initiating 5 </p></dd></dl></div></div><div class="refsect1"><a name="idp1107922644"></a><h2>Description</h2><p> 6 If <code class="constant">JOBCTL_STOP_PENDING</code> is not set yet, initiate group stop with <em class="parameter"><code>signr</code></em> 7 and participate in it. If already set, participate in the existing 8 group stop. If participated in a group stop (and thus slept), <code class="constant">true</code> is 9 returned with siglock released. 10 </p><p> 11 12 If ptraced, this function doesn't handle stop itself. Instead, 13 <code class="constant">JOBCTL_TRAP_STOP</code> is scheduled and <code class="constant">false</code> is returned with siglock 14 untouched. The caller must ensure that INTERRUPT trap handling takes 15 places afterwards. 16</p></div><div class="refsect1"><a name="idp1107925044"></a><h2>CONTEXT</h2><p> 17 Must be called with <em class="parameter"><code>current</code></em>->sighand->siglock held, which is released 18 on <code class="constant">true</code> return. 19</p></div><div class="refsect1"><a name="idp1107926356"></a><h2>RETURNS</h2><p> 20 <code class="constant">false</code> if group stop is already cancelled or ptrace trap is scheduled. 21 <code class="constant">true</code> if participated in group stop. 22</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-do-notify-parent-cldstop.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-do-jobctl-trap.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">do_notify_parent_cldstop</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">do_jobctl_trap</span></td></tr></table></div></body></html> 23