Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 3929

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>utrace_set_events</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="The utrace User Debugging Infrastructure" /><link rel="up" href="ch02.html" title="Chapter&#160;2.&#160;utrace core API" /><link rel="prev" href="re16.html" title="utrace_attach_pid" /><link rel="next" href="re18.html" title="utrace_control" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>utrace_set_events</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re16.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;2.&#160;utrace core API</th><td width="20%" align="right">&#160;<a accesskey="n" href="re18.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="utrace_set_events"><a id="API-utrace-set-events"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>utrace_set_events &#8212; 
     choose which event reports a tracing engine gets
 </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">int <b class="fsfunc">utrace_set_events </b>(</code></td><td>struct task_struct * <var class="pdparam">target</var>, </td></tr><tr><td>&#160;</td><td>struct utrace_engine * <var class="pdparam">engine</var>, </td></tr><tr><td>&#160;</td><td>unsigned long <var class="pdparam">events</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1" title="Arguments"><a id="id2892081"></a><h2>Arguments</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>target</code></em></span></dt><dd><p>
     thread to affect
    </p></dd><dt><span class="term"><em class="parameter"><code>engine</code></em></span></dt><dd><p>
     attached engine to affect
    </p></dd><dt><span class="term"><em class="parameter"><code>events</code></em></span></dt><dd><p>
     new event mask
    </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id2892139"></a><h2>Description</h2><p>
   This changes the set of events for which <em class="parameter"><code>engine</code></em> wants callbacks made.
   </p><p>

   This fails with -<code class="constant">EALREADY</code> and does nothing if you try to clear
   <code class="constant">UTRACE_EVENT</code>(<code class="constant">DEATH</code>) when the <em class="parameter"><code>report_death</code></em> callback may already have
   begun, if you try to clear <code class="constant">UTRACE_EVENT</code>(<code class="constant">REAP</code>) when the <em class="parameter"><code>report_reap</code></em>
   callback may already have begun, or if you try to newly set
   <code class="constant">UTRACE_EVENT</code>(<code class="constant">DEATH</code>) or <code class="constant">UTRACE_EVENT</code>(<code class="constant">QUIESCE</code>) when <em class="parameter"><code>target</code></em> is
   already dead or dying.
   </p><p>

   This can fail with -<code class="constant">ESRCH</code> when <em class="parameter"><code>target</code></em> has already been detached,
   including forcible detach on reaping.
   </p><p>

   If <em class="parameter"><code>target</code></em> was stopped before the call, then after a successful call,
   no event callbacks not requested in <em class="parameter"><code>events</code></em> will be made; if
   <code class="constant">UTRACE_EVENT</code>(<code class="constant">QUIESCE</code>) is included in <em class="parameter"><code>events</code></em>, then a
   <em class="parameter"><code>report_quiesce</code></em> callback will be made when <em class="parameter"><code>target</code></em> resumes.
   </p><p>

   If <em class="parameter"><code>target</code></em> was not stopped and <em class="parameter"><code>events</code></em> excludes some bits that were
   set before, this can return -<code class="constant">EINPROGRESS</code> to indicate that <em class="parameter"><code>target</code></em>
   may have been making some callback to <em class="parameter"><code>engine</code></em>.  When this returns
   zero, you can be sure that no event callbacks you've disabled in
   <em class="parameter"><code>events</code></em> can be made.  If <em class="parameter"><code>events</code></em> only sets new bits that were not set
   before on <em class="parameter"><code>engine</code></em>, then -<code class="constant">EINPROGRESS</code> will never be returned.
   </p><p>

   To synchronize after an -<code class="constant">EINPROGRESS</code> return, see <code class="function">utrace_barrier</code>.
   </p><p>

   When <em class="parameter"><code>target</code></em> is <em class="parameter"><code>current</code></em>, -<code class="constant">EINPROGRESS</code> is not returned.  But note
   that a newly-created engine will not receive any callbacks related to
   an event notification already in progress.  This call enables <em class="parameter"><code>events</code></em>
   callbacks to be made as soon as <em class="parameter"><code>engine</code></em> becomes eligible for any
   callbacks, see <code class="function">utrace_attach_task</code>.
   </p><p>

   These rules provide for coherent synchronization based on <code class="constant">UTRACE_STOP</code>,
   even when <code class="constant">SIGKILL</code> is breaking its normal simple rules.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re16.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="re18.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>utrace_attach_pid</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span>utrace_control</span></td></tr></table></div></body></html>