If TIF_NEED_RESCHED is a flag which specifies if we need to reschedule or not then why we use need_resched process specific variable of task_struct. What's the difference between TIF_NEED_RESCHED and need_ressched? Gaurav. -----Original Message----- From: kernelnewbies-bounce@nl.linux.org [mailto:kernelnewbies-bounce@nl.linux.org] On Behalf Of Robert Love Sent: Saturday, June 26, 2004 8:25 PM To: Artem B. Bityuckiy Cc: Jan Hudec; manish regmi; kernelnewbies@nl.linux.org Subject: Re: Premptive vs non-premptive kernel. On Sat, 2004-06-26 at 18:13 +0400, Artem B. Bityuckiy wrote: > To the point, what does TIF_NEED_RESCHED mean? Particularly, I'm > interesting what does cond_resched() call do. > > Simplifying, cond_resched is: > > if (task has TIF_NEED_RESCHED flag on) > schedule() TIF_NEED_RESCHED is a flag that says "we need to reschedule". So cond_resched() is a function to invoke the scheduler, but only if something else actually needs to run. Robert Love -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/