lkml.org 
[lkml]   [2012]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2012-02-16 15:33    [from the cache]
©2003-2011 Jasper Spaans