1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>wait_event_interruptible_exclusive_locked_irq</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="ch01s04.html" title="Wait queues and Wake events"><link rel="prev" href="API-wait-event-interruptible-exclusive-locked.html" title="wait_event_interruptible_exclusive_locked"><link rel="next" href="API-wait-event-killable.html" title="wait_event_killable"></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">wait_event_interruptible_exclusive_locked_irq</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-wait-event-interruptible-exclusive-locked.html">Prev</a> </td><th width="60%" align="center">Wait queues and Wake events</th><td width="20%" align="right"> <a accesskey="n" href="API-wait-event-killable.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-wait-event-interruptible-exclusive-locked-irq"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>wait_event_interruptible_exclusive_locked_irq — 2 sleep until a condition gets true 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"> <b class="fsfunc">wait_event_interruptible_exclusive_locked_irq </b>(</code></td><td> <var class="pdparam">wq</var>, </td></tr><tr><td> </td><td> <var class="pdparam">condition</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1107248316"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>wq</code></em></span></dt><dd><p> 4 the waitqueue to wait on 5 </p></dd><dt><span class="term"><em class="parameter"><code>condition</code></em></span></dt><dd><p> 6 a C expression for the event to wait for 7 </p></dd></dl></div></div><div class="refsect1"><a name="idp1107250892"></a><h2>Description</h2><p> 8 The process is put to sleep (TASK_INTERRUPTIBLE) until the 9 <em class="parameter"><code>condition</code></em> evaluates to true or a signal is received. 10 The <em class="parameter"><code>condition</code></em> is checked each time the waitqueue <em class="parameter"><code>wq</code></em> is woken up. 11 </p><p> 12 13 It must be called with wq.lock being held. This spinlock is 14 unlocked while sleeping but <em class="parameter"><code>condition</code></em> testing is done while lock 15 is held and when this macro exits the lock is held. 16 </p><p> 17 18 The lock is locked/unlocked using <code class="function">spin_lock_irq</code>/<code class="function">spin_unlock_irq</code> 19 functions which must match the way they are locked/unlocked outside 20 of this macro. 21 </p><p> 22 23 The process is put on the wait queue with an WQ_FLAG_EXCLUSIVE flag 24 set thus when other process waits process on the list if this 25 process is awaken further processes are not considered. 26 </p><p> 27 28 <code class="function">wake_up_locked</code> has to be called after changing any variable that could 29 change the result of the wait condition. 30 </p><p> 31 32 The function will return -ERESTARTSYS if it was interrupted by a 33 signal and 0 if <em class="parameter"><code>condition</code></em> evaluated to true. 34</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-wait-event-interruptible-exclusive-locked.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch01s04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-wait-event-killable.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">wait_event_interruptible_exclusive_locked</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">wait_event_killable</span></td></tr></table></div></body></html> 35