Re: schedule()

Jeff Garzik (jgarzik@mandrakesoft.com)
Tue, 26 Feb 2002 15:05:03 -0500


"Richard B. Johnson" wrote:
>
> I just read on this list that:
>
> while(something)
> {
> current->policy |= SCHED_YIELD;
> schedule();
> }
>
> Will no longer be allowed in a kernel module! If this is true, how
> do I loop, waiting for a bit in a port, without wasting CPU time?

Call yield() or better yet, schedule_timeout()

In 2.4, define the above to be yield() in some compatibility module...

-- 
Jeff Garzik      | "UNIX enhancements aren't."
Building 1024    |           -- says /usr/games/fortune
MandrakeSoft     |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/