<div dir="ltr"><div>yes </div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 2, 2015 at 11:40 PM, nick <span dir="ltr"><<a href="mailto:xerofoify@gmail.com" target="_blank">xerofoify@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="HOEnZb"><div class="h5"><br>
<br>
On 2015-06-02 05:38 PM, Mustafa Hussain wrote:<br>
> this what i was talking you about :)<br>
><br>
> On Sat, May 9, 2015 at 9:29 PM, nick <<a href="mailto:xerofoify@gmail.com">xerofoify@gmail.com</a>> wrote:<br>
><br>
>><br>
>><br>
>> On 2015-05-09 12:44 PM, Mustafa Hussain wrote:<br>
>>> Hi all,<br>
>>><br>
>>> i am working with __sched __schedule()<br>
>>><br>
>>> and i want to add some thing i want to check whether the prev will become<br>
>>> idle or not how can i do this.<br>
>>><br>
>>> thanks in advance<br>
>>><br>
>>> -<br>
>>> -<br>
>> Mustafa,<br>
>> After looking around in pick_next_task there is a scheduler class called<br>
>> idle_sched_class for idling when tasks need to be run. Something like<br>
>> /*declare sched_class pointer to idle_sched_class address*/<br>
>> const struct sched_class *idle=&idle_sched_class;<br>
>> /*Check if the pointer pointing to the idle class is equal to prev's<br>
>> sched_class*/<br>
>> if(prev->sched_class == idle)<br>
>> After this condition you can just:<br>
>> printk(KERN_INFO "Prev is equal to idle_sched_class,now running the idle<br>
>> sched_class\n");<br>
>> If you have another question about this please let me known.<br>
>> Cheers,<br>
>> Nick<br>
>>><br>
</div></div>First do you known what scheduling classes/ task structures are?<br>
<div class="HOEnZb"><div class="h5">Nick<br>
>>><br>
>>><br>
>>> _______________________________________________<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>
</div></div></blockquote></div><br></div></div>