Re: Q: waiting for a short time and not beeing a resource hog

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Wed, 1 Dec 1999 16:41:39 +0100 (CET)


On Wed, 1 Dec 1999, Andreas Schuldei wrote:

> Quoting Ingo Molnar (mingo@chiara.csoma.elte.hu):
> > you probably want to use schedule_timeout(deltajiffies). You must make
> > sure that you can reschedule at that point.
>
> How can I tell? I am in an interrupt routine. not the ideal point for
> sheduling, right?

exactly, you must never reschedule in an interrupt.

> What criteria is there to tell a reshedulable function from an other
> one?

only interrupt-alike functions are not allowed to reschedule.

you can still postpone work in an interrupt handler without busy-waiting,
use add_timer()/del_timer() to set up timer events.

-- mingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/