Re: 2.5.40-mm2

Robert Love
2002-10-06T22:32:59Z

On Sun, 2002-10-06 at 18:33, Andrew Morton wrote:

> I think it's a way of doing "cond_resched() if cond_resched() is
> a legal thing to do right now".
>
> I'm sure David isn't using preempt though.

If the system is preemptible, then the call can be replaced with
preempt_check_resched() which avoids the unneeded inc and dec.

But if the system is preemptible, it probably does not accomplish much
because we will already have preempted (e.g. the interrupt handler that
woke up a new task set need_resched and on return from interrupt we
serviced it).

If the system is not preemptible (non-zero preempt_count here) this
accomplishes nothing.

Robert Love