1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>mutex_lock_interruptible</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Unreliable Guide To Locking"><link rel="up" href="apiref-mutex.html" title="Chapter&#160;11.&#160;Mutex API reference"><link rel="prev" href="API-ww-mutex-unlock.html" title="ww_mutex_unlock"><link rel="next" href="API-mutex-trylock.html" title="mutex_trylock"></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">mutex_lock_interruptible</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-ww-mutex-unlock.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;11.&#160;Mutex API reference</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-mutex-trylock.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-mutex-lock-interruptible"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>mutex_lock_interruptible &#8212; 
2     acquire the mutex, interruptible
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 __sched <b class="fsfunc">mutex_lock_interruptible </b>(</code></td><td>struct mutex * <var class="pdparam">lock</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1124754116"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>lock</code></em></span></dt><dd><p>
4     the mutex to be acquired
5    </p></dd></dl></div></div><div class="refsect1"><a name="idp1124755644"></a><h2>Description</h2><p>
6   Lock the mutex like <code class="function">mutex_lock</code>, and return 0 if the mutex has
7   been acquired or sleep until the mutex becomes available. If a
8   signal arrives while waiting for the lock then this function
9   returns -EINTR.
10   </p><p>
11
12   This function is similar to (but not equivalent to) <code class="function">down_interruptible</code>.
13</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-ww-mutex-unlock.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="apiref-mutex.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-mutex-trylock.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">ww_mutex_unlock</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">mutex_trylock</span></td></tr></table></div></body></html>
14