Re: Use of yield() in the kernel

From: Duncan Sands (baldrick@wanadoo.fr)
Date: Fri Oct 25 2002 - 09:15:24 EST


This is my current understanding of some different ways to schedule:

(1) Yield to a higher priority task (if there is one):
        cond_resched();

(2) Yield to the next task (if there is another one):
        set_current_state(TASK_RUNNING);
        schedule();

(3) Yield to all tasks:
        yield();

Notes:
(1) Also yields if the current task's time quantum has expired.
(3) Only guaranteed to yield to all tasks on the active list.

Corrections?

Duncan.
-
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/



This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 22:00:27 EST