mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* schedule()
@ 2002-02-26 19:57 Richard B. Johnson
  2002-02-26 20:05 ` schedule() Jeff Garzik
  2002-02-26 20:13 ` schedule() Davide Libenzi
  0 siblings, 2 replies; 12+ messages in thread
From: Richard B. Johnson @ 2002-02-26 19:57 UTC (permalink / raw)
  To: Linux kernel



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?

A lot of hardware does not generate interrupts upon a condition,
there is no CPU activity that could send a wake_up_interruptible()
to something sleeping.

For instance, I need to write data to a hardware FIFO, one long-word
at a time, but I can't just write. I have to wait for a bit to be
set or reset for each and every write. I'm going to be burning a
lot of CPU cycles if I can't schedule() while the trickle-down-effect
of the hardware is happening.


Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (797.90 BogoMips).

        111,111,111 * 111,111,111 = 12,345,678,987,654,321


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-02-27 15:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-26 19:57 schedule() Richard B. Johnson
2002-02-26 20:05 ` schedule() Jeff Garzik
2002-02-26 20:14   ` schedule() Richard B. Johnson
2002-02-27  0:56   ` schedule() Nigel Gamble
2002-02-27 15:29     ` schedule() Richard B. Johnson
2002-02-26 20:13 ` schedule() Davide Libenzi
2002-02-26 20:17   ` schedule() Richard B. Johnson
2002-02-26 20:19     ` schedule() Davide Libenzi
2002-02-26 20:47       ` schedule() Richard B. Johnson
2002-02-26 20:50         ` schedule() Davide Libenzi
2002-02-26 21:14       ` schedule() Richard B. Johnson
2002-02-26 22:37         ` schedule() Davide Libenzi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®