Re: [PATCH] hrtimers: Special-case zero length sleeps

From: Alan Cox
Date: Thu Feb 16 2012 - 09:29:49 EST


> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/