Messages in this thread |  | | | Date | Thu, 16 Feb 2012 14:31:32 +0000 | | From | Alan Cox <> | | Subject | Re: [PATCH] hrtimers: Special-case zero length sleeps |
| |
> Userspace clearly has an expectation that sleep(0) is magic in some > ill-defined way. We'd be well within our rights to break that > expectation, but I think it's common enough to warrant special casing.
In historical Unix sleep(0) ends up the nearest equivalent it had to triggering a reschedule and giving up the rest of the timeslice.
I suspect special casing it as yield() isn't far from the right result ?
Alan
|  |