[haiku-commits] Re: r34615 - in haiku/trunk: headers/private/kernel src/system/kernel src/system/kernel/arch/x86 src/system/kernel/scheduler

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 10 Dec 2009 12:41:05 +0100

On 2009-12-10 at 13:28:12 [+0100], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> 
wrote:
> ingo_weinhold@xxxxxx wrote:
> > +        if (ret == B_INVOKE_SCHEDULER || !thread->cpu-
> > >invoke_scheduler_if_idle
> > +            || thread->priority == B_IDLE_PRIORITY) {
> > +            scheduler_reschedule();
> > +        }
> 
> What does this try to express?
> I don't think I understand this correctly, at least, if it is correct
> :-)

Mmh, it just means, what you can read there, i.e.: Reschedule if,
* ret == B_INVOKE_SCHEDULER,
* the invoke_scheduler_if_idle flag is clear, or
* an idle thread is running.

It might become move obvious, if you have a look at the outer "if" 
condition, which is "ret == B_INVOKE_SCHEDULER || 
thread->cpu->invoke_scheduler". So basically the inner "if" only checks the 
"if idle" condition.

CU, Ingo

Other related posts: