1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>rcu_read_lock_bh_held</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-rcu-read-lock-held.html" title="rcu_read_lock_held"><link rel="next" href="API-init-rcu-head-on-stack.html" title="init_rcu_head_on_stack"></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">rcu_read_lock_bh_held</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-rcu-read-lock-held.html">Prev</a> </td><th width="60%" align="center">Kernel utility functions</th><td width="20%" align="right"> <a accesskey="n" href="API-init-rcu-head-on-stack.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-rcu-read-lock-bh-held"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rcu_read_lock_bh_held — 2 might we be in RCU-bh read-side critical section? 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">int <b class="fsfunc">rcu_read_lock_bh_held </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="idp1108738940"></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="idp1108740548"></a><h2>Description</h2><p> 6 </p><p> 7 8 Check for bottom half being disabled, which covers both the 9 CONFIG_PROVE_RCU and not cases. Note that if someone uses 10 <code class="function">rcu_read_lock_bh</code>, but then later enables BH, lockdep (if enabled) 11 will show the situation. This is useful for debug checks in functions 12 that require that they be called within an RCU read-side critical 13 section. 14 </p><p> 15 16 Check <code class="function">debug_lockdep_rcu_enabled</code> to prevent false positives during boot. 17 </p><p> 18 19 Note that <code class="function">rcu_read_lock</code> is disallowed if the CPU is either idle or 20 offline from an RCU perspective, so check for those as well. 21</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-rcu-read-lock-held.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch01s09.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-init-rcu-head-on-stack.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">rcu_read_lock_held</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">init_rcu_head_on_stack</span></td></tr></table></div></body></html> 22