lkml.org 
[lkml]   [2002]   [Feb]   [26]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 26 Feb 2002 15:05:03 -0500
FromJeff Garzik <>
SubjectRe: schedule()
"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/
\
 
 \ /
  Last update: 2005-03-22 12:20    [from the cache]
©2003-2008