Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117615
b: refs/heads/master
c: 96d2ab4
h: refs/heads/master
i:
  117613: 94ef993
  117611: 6945006
  117607: 38136ca
  117599: c8344f0
v: v3
  • Loading branch information
Arjan van de Ven committed Sep 7, 2008
1 parent 48752b0 commit a10b27f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 704af52bd13a5d9f3c60c496c68e752fafdfb434
refs/heads/master: 96d2ab484e7a9bafdab44b8c7d1ef5944319b18c
13 changes: 8 additions & 5 deletions trunk/fs/select.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
* better solutions..
*/

static unsigned long __estimate_accuracy(struct timespec *tv)
static long __estimate_accuracy(struct timespec *tv)
{
unsigned long slack;
long slack;
int divfactor = 1000;

if (task_nice(current) > 0)
Expand All @@ -54,10 +54,13 @@ static unsigned long __estimate_accuracy(struct timespec *tv)

if (slack > 100 * NSEC_PER_MSEC)
slack = 100 * NSEC_PER_MSEC;

if (slack < 0)
slack = 0;
return slack;
}

static unsigned long estimate_accuracy(struct timespec *tv)
static long estimate_accuracy(struct timespec *tv)
{
unsigned long ret;
struct timespec now;
Expand Down Expand Up @@ -330,7 +333,7 @@ int do_select(int n, fd_set_bits *fds, struct timespec *end_time)
timed_out = 1;
}

if (end_time)
if (end_time && !timed_out)
slack = estimate_accuracy(end_time);

retval = 0;
Expand Down Expand Up @@ -656,7 +659,7 @@ static int do_poll(unsigned int nfds, struct poll_list *list,
timed_out = 1;
}

if (end_time)
if (end_time && !timed_out)
slack = estimate_accuracy(end_time);

for (;;) {
Expand Down

0 comments on commit a10b27f

Please sign in to comment.