Re: yield() in i2c non-happy paths hits BUG under -rt patch

Sven-Thorsten Dietrich
2009-11-08T18:57:16Z

On 11/07/2009 12:01 PM, Jean Delvare wrote:
>
> One thing I do not understand: if yield() is a bug to RT kernels, then
> we would have to remove them all? But so far, yield() still exists in
> the kernel tree, and it serves a purpose. Are you going to ask all
> developers to remove all occurrences of yield() in their code? Doesn't
> sound terribly realistic.
>
>

The flaw in using yield() with RT priorities, is that it doesn't do what
you expect.

The scheduler will run, and pick the highest-priority thread, which is
the one yield()-ing.

So the risk is, that whatever the yield() intended to do, it won't do,
and worse, that you will end up endlessly yielding to yourself, locking
the machine.

So the call is for something more explicit of an implementation.

Sven