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

Mark Brown
2009-11-16T15:56:06Z

On Fri, Nov 13, 2009 at 11:03:39PM +0100, Thomas Gleixner wrote:

> Q: Why put people yield() into their code ?
> A: Because:
> - it is less nasty than busy waiting for a long time
> - it works better

...

> I can see the idea of using yield() to let other tasks making progress
> in situations where the hardware is a design failure as well,
> e.g. bitbang devices. But if we have to deal with hardware which is
> crap by design yield() is the worst of all answers simply due to its
> horrible semantics.

What other options are there available for the first case (which is
often why things work better with the use of yield) that don't involve
sleeps, or is the idea that in situations like this drivers should
always sleep?