1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>synchronize_rcu_tasks</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="ch01s09.html" title="Kernel utility functions"><link rel="prev" href="API-destroy-rcu-head-on-stack.html" title="destroy_rcu_head_on_stack"><link rel="next" href="API-rcu-barrier-tasks.html" title="rcu_barrier_tasks"></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">synchronize_rcu_tasks</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-destroy-rcu-head-on-stack.html">Prev</a>&#160;</td><th width="60%" align="center">Kernel utility functions</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-rcu-barrier-tasks.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-synchronize-rcu-tasks"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>synchronize_rcu_tasks &#8212; 
2     wait until an rcu-tasks grace period has elapsed.
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">void <b class="fsfunc">synchronize_rcu_tasks </b>(</code></td><td> <var class="pdparam">void</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1108763372"></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="idp1108764980"></a><h2>Description</h2><p>
6   </p><p>
7
8   Control will return to the caller some time after a full rcu-tasks
9   grace period has elapsed, in other words after all currently
10   executing rcu-tasks read-side critical sections have elapsed.  These
11   read-side critical sections are delimited by calls to <code class="function">schedule</code>,
12   <code class="function">cond_resched_rcu_qs</code>, idle execution, userspace execution, calls
13   to <code class="function">synchronize_rcu_tasks</code>, and (in theory, anyway) <code class="function">cond_resched</code>.
14   </p><p>
15
16   This is a very specialized primitive, intended only for a few uses in
17   tracing and other situations requiring manipulation of function
18   preambles and profiling hooks.  The <code class="function">synchronize_rcu_tasks</code> function
19   is not (yet) intended for heavy use from multiple CPUs.
20   </p><p>
21
22   Note that this guarantee implies further memory-ordering guarantees.
23   On systems with more than one CPU, when <code class="function">synchronize_rcu_tasks</code> returns,
24   each CPU is guaranteed to have executed a full memory barrier since the
25   end of its last RCU-tasks read-side critical section whose beginning
26   preceded the call to <code class="function">synchronize_rcu_tasks</code>.  In addition, each CPU
27   having an RCU-tasks read-side critical section that extends beyond
28   the return from <code class="function">synchronize_rcu_tasks</code> is guaranteed to have executed
29   a full memory barrier after the beginning of <code class="function">synchronize_rcu_tasks</code>
30   and before the beginning of that RCU-tasks read-side critical section.
31   Note that these guarantees include CPUs that are offline, idle, or
32   executing in user mode, as well as CPUs that are executing in the kernel.
33   </p><p>
34
35   Furthermore, if CPU A invoked <code class="function">synchronize_rcu_tasks</code>, which returned
36   to its caller on CPU B, then both CPU A and CPU B are guaranteed
37   to have executed a full memory barrier during the execution of
38   <code class="function">synchronize_rcu_tasks</code> -- even if CPU A and CPU B are the same CPU
39   (but again only if the system has more than one CPU).
40</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-destroy-rcu-head-on-stack.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch01s09.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-rcu-barrier-tasks.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">destroy_rcu_head_on_stack</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 class="phrase">rcu_barrier_tasks</span></td></tr></table></div></body></html>
41