Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117617
b: refs/heads/master
c: 3bd0120
h: refs/heads/master
i:
  117615: a10b27f
v: v3
  • Loading branch information
Arjan van de Ven committed Sep 11, 2008
1 parent 3de13fb commit 8d4be8e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 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: 14e2acd8686507f8dee6d6269760d9ed145b2a89
refs/heads/master: 3bd012060f962567aadb52b27b2fc8fdc91102c7
13 changes: 6 additions & 7 deletions trunk/arch/alpha/kernel/osf_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,12 +986,10 @@ asmlinkage int
osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
struct timeval32 __user *tvp)
{
struct timespec end_time, *to = NULL;
s64 timeout = MAX_SCHEDULE_TIMEOUT;
if (tvp) {
time_t sec, usec;

to = &end_time;

if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp))
|| __get_user(sec, &tvp->tv_sec)
|| __get_user(usec, &tvp->tv_usec)) {
Expand All @@ -1001,13 +999,14 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
if (sec < 0 || usec < 0)
return -EINVAL;

if (poll_select_set_timeout(to, sec, usec * NSEC_PER_USEC))
return -EINVAL;

if ((unsigned long) sec < MAX_SELECT_SECONDS) {
timeout = (usec + 1000000/HZ - 1) / (1000000/HZ);
timeout += sec * (unsigned long) HZ;
}
}

/* OSF does not copy back the remaining time. */
return core_sys_select(n, inp, outp, exp, to);
return core_sys_select(n, inp, outp, exp, &timeout);
}

struct rusage32 {
Expand Down
7 changes: 6 additions & 1 deletion trunk/kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1563,9 +1563,14 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,
struct restart_block *restart;
struct hrtimer_sleeper t;
int ret = 0;
unsigned long slack;

slack = current->timer_slack_ns;
if (rt_task(current))
slack = 0;

hrtimer_init_on_stack(&t.timer, clockid, mode);
hrtimer_set_expires(&t.timer, timespec_to_ktime(*rqtp));
hrtimer_set_expires_range_ns(&t.timer, timespec_to_ktime(*rqtp), slack);
if (do_nanosleep(&t, mode))
goto out;

Expand Down

0 comments on commit 8d4be8e

Please sign in to comment.