[fixed] Fix the linux yield logic

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: [patch] Fix the linux yield logic

Post by CuteAlien »

Yeah, that was the original question - does nanosleep(0) give up the processor. I've searched for an answer to that rather long yesterday and I think it doesn't and we really need to use 1. It guarantees only that it gives up the processor until sleep-time is over, the behavior for 0 is undefined - I even stumbled upon some thread on kernel mailing list where it seems that people had run into the same thing when this behavior was changed at some time.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply