<br><br><div class="gmail_quote">On Fri, Jan 20, 2012 at 12:32 PM, Dave Hylands <span dir="ltr"><<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>></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>
<<a href="mailto:darshan.ghumare@gmail.com">darshan.ghumare@gmail.com</a>> wrote:<br>
</div>...snip...<br>
<div class="im HOEnZb">> What if,<br>
> spin_lock_irqsave(&lock, flags);<br>
> for ( ; ; )<br>
> {<br>
> ;<br>
> }<br>
> spin_lock_irqrestore(&lock, flags);<br>
<br>
</div><div>Since you're using spinlocks and disabling interrupts, this would be<br>
running in kernel space.<br>
<br>
On a single core machine - you'll have locked up your entire computer.<br>
<br>
On a multi-core machine you'll have locked up one core.<br>
<br>
You don'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'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 & 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>