RIOT-OS/RIOT — pull request #1836 by Kijewski (2014-10-17 23:33:01+00:00)
Title: core: introduce sched_yield(), yield less

Fixes #1708.

Currently involutary preemption causes the current thread not only to
yield for a higher prioritized thread, but all other threads of its own
priority class, too.

This PR adds the function `sched_yield()`, which will yield the current
thread in favor of higher prioritized functions, but not for threads of
its own priority class.

Boards now need to implement `sched_yield()` instead of
`thread_yield()`, but `COREIF_NG` boards are not affected in any way.

`thread_yield()` retains its old meaning: yield for every thread that
has the same or a higher priority.

This PR does not touch the occurrences of `thread_yield()` in the periph
drivers, because the author of this PR did not look into the logic of
the various driver implementations.