RE: sched_yield

From: Davide Libenzi (davidel@xmailserver.org)
Date: Sun Feb 25 2001 - 13:52:08 EST


On 25-Feb-2001 Fabrice Peix wrote:
>
>
>
> Yop,
>
> Just a newbie question ...
> Why sys_sched_yield don't call schedule ?
>
>
> man page of sched_yield tell :
>
> "A process can relinquish the processor voluntarily
> without blocking by calling sched_yield.
> The process will then be moved to the end
> of the queue for its static priority and
> a new process gets to run."
>

It sets, under certain conditions ( nr_running ), the variable need_resched
and, in the system call return code this value is checked and schedule() is
called.
Look at sched.c and entry.S.

- Davide

-
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 : Wed Feb 28 2001 - 21:00:09 EST