Re: your mail

Stephen C. Tweedie (sct@dcs.ed.ac.uk)
Sat, 5 Apr 1997 22:46:42 +0100


On Tue, 01 Apr 1997 16:39:48 -0500, "Michael K. Johnson"
<johnsonm@redhat.com> said:

> It sounds like the rule is now:
> o You can use schedule() when you just want to possibly give time
> to other processes, modulo scheduling policy now in effect. After
> all, schedule() didn't always yield in the past; it only yielded if
> there was any reason to do so.

Indeed. To force a yield, you would need to do a
current->counter = 0;
before you schedule(), otherwise you might well be picked for
immediate reschedule. schedule() just forces the scheduler algorithm
to run, it doesn't force a context switch as a yield() should do.

Cheers,
Stephen.