1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>local_irq_save()/local_irq_restore() include/linux/irqflags.h</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Unreliable Guide To Hacking The Linux Kernel"><link rel="up" href="common-routines.html" title="Chapter 6. Common Routines"><link rel="prev" href="routines-endian.html" title="cpu_to_be32()/be32_to_cpu()/cpu_to_le32()/le32_to_cpu() include/asm/byteorder.h"><link rel="next" href="routines-softirqs.html" title="local_bh_disable()/local_bh_enable() include/linux/interrupt.h"></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"><code class="function">local_irq_save()</code>/<code class="function">local_irq_restore()</code> 2 <code class="filename">include/linux/irqflags.h</code> 3 </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="routines-endian.html">Prev</a> </td><th width="60%" align="center">Chapter 6. Common Routines</th><td width="20%" align="right"> <a accesskey="n" href="routines-softirqs.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="routines-local-irqs"></a><code class="function">local_irq_save()</code>/<code class="function">local_irq_restore()</code> 4 <code class="filename">include/linux/irqflags.h</code> 5 </h2></div></div></div><p> 6 These routines disable hard interrupts on the local CPU, and 7 restore them. They are reentrant; saving the previous state in 8 their one <code class="varname">unsigned long flags</code> argument. If you 9 know that interrupts are enabled, you can simply use 10 <code class="function">local_irq_disable()</code> and 11 <code class="function">local_irq_enable()</code>. 12 </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="routines-endian.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="common-routines.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="routines-softirqs.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">cpu_to_be32()</code>/<code class="function">be32_to_cpu()</code>/<code class="function">cpu_to_le32()</code>/<code class="function">le32_to_cpu()</code> 13 <code class="filename">include/asm/byteorder.h</code> 14  </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <code class="function">local_bh_disable()</code>/<code class="function">local_bh_enable()</code> 15 <code class="filename">include/linux/interrupt.h</code></td></tr></table></div></body></html> 16