epoll: make epoll_wait() use the hrtimer range feature

This make epoll use hrtimers for the timeout value which prevents
epoll_wait() from timing out up to a millisecond early.

This mirrors the behavior of select() and poll().

Signed-off-by: Shawn Bohrer <[email protected]>
Cc: Al Viro <[email protected]>
Acked-by: Davide Libenzi <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Shawn Bohrer 2010-10-27 15:34:54 -07:00 • committed by Linus Torvalds
commit 95aac7b1cd
3 changed files with 22 additions and 17 deletions

View file

@ -67,7 +67,7 @@ static long __estimate_accuracy(struct timespec *tv)
return slack;
}
static long select_estimate_accuracy(struct timespec *tv)
long select_estimate_accuracy(struct timespec *tv)
{
unsigned long ret;
struct timespec now;