Hi peter,<div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">>>we can immediately deduced that threaded IRQ handler is<br>
>>sleepable/blocking-allowed, and therefore process context.<br><br></span><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">>>Correct?</span></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, sans-serif">Hmm..But when i tried to take a mutex lock in threaded_irq, it is throwing a warning message<br>
</font></div><div><div><font class="Apple-style-span" face="arial, sans-serif">"BUG: sleeping function called from invalid context"... So i was wondering which way it is..<br></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><br>
</font></div><div><font class="Apple-style-span" face="arial, sans-serif">Thank you,<br></font></div><div><div class="gmail_quote">Sandeep</div><div class="gmail_quote">On Tue, Sep 6, 2011 at 1:22 AM, Peter Teoh <span dir="ltr"><<a href="mailto:htmldeveloper@gmail.com">htmldeveloper@gmail.com</a>></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, Sep 1, 2011 at 5:48 PM, sandeep kumar <<a href="mailto:coolsandyforyou@gmail.com">coolsandyforyou@gmail.com</a>> wrote:<br>
><br>
> HI all,<br>
><br>
> I want to know whether threaded_irq will be in interrupt context or process context.<br>
> I heard they replace workqueues. But i dont know which context they will be running in.<br>
><br>
> Any furthur references where i get more info..<br>
<br>
</div>Frankly I am not sure, but after reading Documentation/gpio.txt - where it says:<br>
<br>
Accessing such GPIOs requires a context which may sleep, for example<br>
a threaded IRQ handler, and those accessors must be used instead of<br>
spinlock-safe accessors without the cansleep() name suffix.<br>
<br>
we can immediately deduced that threaded IRQ handler is<br>
sleepable/blocking-allowed, and therefore process context.<br>
<br>
Correct?<br>
><br>
> --<br>
<div class="im">> With regards,<br>
> Sandeep Kumar Anantapalli,<br>
><br>
><br>
</div>> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
><br>
<br>
<br>
<br>
--<br>
Regards,<br>
<font color="#888888">Peter Teoh<br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>With regards,<br>Sandeep Kumar Anantapalli,<br><br>
</div></div>