<font color="#3333ff"><font><font face="verdana,sans-serif">Yah, Thanks for the help Mulyadi and Sandeep.</font></font></font><div><br></div><div><div><font color="#3333ff"><font><font face="verdana,sans-serif">--</font></font></font></div>
<div><font color="#3333ff"><font><font face="verdana,sans-serif">Sunil</font></font></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Dec 1, 2012 at 10:35 AM, Mulyadi Santosa <span dir="ltr"><<a href="mailto:mulyadi.santosa@gmail.com" target="_blank">mulyadi.santosa@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Sandeep....<br>
<div class="im"><br>
On Sat, Dec 1, 2012 at 11:50 AM, SandeepKsinha <<a href="mailto:sandeepksinha@gmail.com">sandeepksinha@gmail.com</a>> wrote:<br>
> Interrupt context is a better alternative. Make changes around the code<br>
> which picks up the next process for execution. The waking up would be taken<br>
> care automatically in that case.<br>
><br>
> Also, this approach would be least disruptive if compared with the other<br>
> alternative you listed out.<br>
><br>
> Mulyadi,<br>
> Any help?<br>
<br>
</div>Since you "summon", then I have no other choice :)<br>
<br>
OK, I need to be careful here. If I may to clear up the things, there<br>
are two objectives here:<br>
<br>
1. To unschedule other process....<br>
<br>
Alright,I think the simplest one is setting need_resched to true or 1<br>
(as you guys already found out). That's not the fastest way, but I am<br>
sure the most straight forward way.<br>
<br>
2. To block the process until it is allowed to run...<br>
<br>
Sounds like mimic-ing SIGSTOP handler to me......<br>
<br>
So I guess, to do the entire thing simplest way, is by sending SIGSTOP. Agree?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
regards,<br>
<br>
Mulyadi Santosa<br>
Freelance Linux trainer and consultant<br>
<br>
blog: <a href="http://the-hydra.blogspot.com" target="_blank">the-hydra.blogspot.com</a><br>
training: <a href="http://mulyaditraining.blogspot.com" target="_blank">mulyaditraining.blogspot.com</a><br>
</font></span></blockquote></div><br></div>