<br><br><div class="gmail_quote">On Fri, Jan 20, 2012 at 12:32 PM, Dave Hylands <span dir="ltr">&lt;<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

Hi Darshan,<br></blockquote><div>HI Dave,<br> <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Replying to all this time....<br></blockquote><div>Thanks. <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im"><br>
On Thu, Jan 19, 2012 at 9:41 PM, Darshan Ghumare<br>
&lt;<a href="mailto:darshan.ghumare@gmail.com">darshan.ghumare@gmail.com</a>&gt; wrote:<br>
</div>...snip...<br>
<div class="im HOEnZb">&gt; What if,<br>
&gt; spin_lock_irqsave(&amp;lock, flags);<br>
&gt; for ( ; ; )<br>
&gt; {<br>
&gt;        ;<br>
&gt; }<br>
&gt; spin_lock_irqrestore(&amp;lock, flags);<br>
<br>
</div><div>Since you&#39;re using spinlocks and disabling interrupts, this would be<br>
running in kernel space.<br>
<br>
On a single core machine - you&#39;ll have locked up your entire computer.<br>
<br>
On a multi-core machine you&#39;ll have locked up one core.<br>
<br>
You don&#39;t need to use the spinlock, just disabling interrupts is<br>
sufficient. Even on a multicore machine, the spinlocks would just<br>
prevent a second core from executing the code if it tried to acquire<br>
the same spinlock.<br>
<br>
I don&#39;t think that there is any convenient way to kill such a thread.</div></blockquote><div>IMHO, signals are handled when process is about to switch back to user-mode.<br>If that is the case then what if, there are two threads(in user-mode) in the process where one is stuck<br>

in the syscall which has infinite loop &amp; other is executing some task in the user-mode, then still this process can not be killed?<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class="im HOEnZb">
<br>
</div><div class="HOEnZb"><div class="h5">--<br>
Dave Hylands<br>
Shuswap, BC, Canada<br>
<a href="http://www.davehylands.com" target="_blank">http://www.davehylands.com</a><br>
</div></div></blockquote></div><br>Regards<br>Darshan<br><br clear="all"><br>-- <br>Darshan®<br>