aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-10-06 16:01:53 -0400
committerArjan van de Ven <arjan@linux.intel.com>2008-10-06 16:01:53 -0400
commit80a4b18d19bf1f7b88a261088c00a0d6b310a722 (patch)
treec084c0bffe8e6b685aee009622913fd4bfc00571 /arch/alpha/kernel
parent2e94d1f71f7e4404d997e6fb4f1618aa147d76f9 (diff)
select: fix alpha OSF wrapper
... alpha calls the core select code from inside it's architecture code for emulating OSF; this patch makes it compile again Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r--arch/alpha/kernel/osf_sys.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 8509dad31204..8e19acbf2886 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -986,10 +986,12 @@ asmlinkage int
986osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, 986osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
987 struct timeval32 __user *tvp) 987 struct timeval32 __user *tvp)
988{ 988{
989 s64 timeout = MAX_SCHEDULE_TIMEOUT; 989 struct timespec end_time, *to = NULL;
990 if (tvp) { 990 if (tvp) {
991 time_t sec, usec; 991 time_t sec, usec;
992 992
993 to = &end_time;
994
993 if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp)) 995 if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp))
994 || __get_user(sec, &tvp->tv_sec) 996 || __get_user(sec, &tvp->tv_sec)
995 || __get_user(usec, &tvp->tv_usec)) { 997 || __get_user(usec, &tvp->tv_usec)) {
@@ -999,14 +1001,13 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
999 if (sec < 0 || usec < 0) 1001 if (sec < 0 || usec < 0)
1000 return -EINVAL; 1002 return -EINVAL;
1001 1003
1002 if ((unsigned long) sec < MAX_SELECT_SECONDS) { 1004 if (poll_select_set_timeout(to, sec, usec * NSEC_PER_USEC))
1003 timeout = (usec + 1000000/HZ - 1) / (1000000/HZ); 1005 return -EINVAL;
1004 timeout += sec * (unsigned long) HZ; 1006
1005 }
1006 } 1007 }
1007 1008
1008 /* OSF does not copy back the remaining time. */ 1009 /* OSF does not copy back the remaining time. */
1009 return core_sys_select(n, inp, outp, exp, &timeout); 1010 return core_sys_select(n, inp, outp, exp, to);
1010} 1011}
1011 1012
1012struct rusage32 { 1013struct rusage32 {