Has anyone else noticed that sched_yield() doesn't work?
The calling process just continues on quite happily.
Anyway, here is a patch that makes it work:
--- kernel/sched.c.orig Fri May 2 08:43:07 1997
+++ kernel/sched.c Fri May 2 09:37:21 1997
@@ -1459,9 +1459,12 @@
asmlinkage int sys_sched_yield(void)
{
cli();
- move_last_runqueue(current);
+ if (current->next_run) {
+ move_last_runqueue(current);
+ current->counter = 0;
+ need_resched = 1;
+ }
sti();
- need_resched = 1;
return 0;
}
Philip
p.s. Who is dealing with patches in this area these days?
-- Philip Gladstone +1 617 487 7700 Raptor Systems, Waltham, MA http://www.raptor.com/ ------- end of forwarded message -------