<div dir="ltr">Hi,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 7, 2013 at 8:53 AM,  <span dir="ltr">&lt;<a href="mailto:Valdis.Kletnieks@vt.edu" target="_blank">Valdis.Kletnieks@vt.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, 07 Mar 2013 17:17:19 +0200, Kevin Wilson said:<br>
<br>
&gt; Does this mean that once you are disabling<br>
&gt; interrupts, these interrupts are lost ?  even later, when we will<br>
&gt; enable interrupts, the interrupts from the past that should have been<br>
&gt; created (but interrupts were disabled at that time interval) are in<br>
&gt; fact lost?<br>
<br>
</div>Level-triggered interruots will go off once interrupts are re-enabled,<br>
assuming that the device has kept the level set and not given up and timed<br>
out.<br>
<br>
Edge-trittered interrupts are gone.  That&#39;s part of why most hardware<br>
doesn&#39;t use edge triggers - it&#39;s just too hard to guarantee proper device<br>
driver operation.<br></blockquote><div><br></div><div>In my experience, edges triggered interrupts are always latched by the HW when they arrive. If another edge comes along between the initial edge and the time that the interrupt is cleared, then this second edge is lost. The fact that an interrupt is pending will still be retained though, and as soon as interrupts are enabled, then the interrupt handler will fire.<br>
<br></div><div>So, it&#39;s quite often the case that you want to clear (&quot;knock down&quot;) the interrupt as soon as possible inside your drive to help reduce the window where back-to-back edges will miss the second edge.<br>
<br></div><div>You&#39;ll never miss the first edge.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Also, in common usage, &quot;disabled interrupts&quot; means that you&#39;re not listening<br>
to *any* interrupts, while &quot;masked&quot; means &quot;we&#39;re not listening to *this*<br>
interrupt source, even if we *are* accepting interrupts from other sources&quot;.<br></blockquote><div><br></div><div>Normally disabling interrupts is just another form of masking, it just happens to mask all of the interrupts rather than one particular one. Even when you disable interrupts, you typically still have access to the unmasked interrupt state.<br>
</div><br></div>-- <br>Dave Hylands<br>Shuswap, BC, Canada<br><a href="http://www.davehylands.com" target="_blank">http://www.davehylands.com</a>
</div></div>