aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/osf_sys.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-10-06 16:01:53 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-07 01:17:37 -0400
commit14e2acd8686507f8dee6d6269760d9ed145b2a89 (patch)
tree584303a35118e6819cdf50348cca8e8fecdb7697 /arch/alpha/kernel/osf_sys.c
parent96d2ab484e7a9bafdab44b8c7d1ef5944319b18c (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> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/alpha/kernel/osf_sys.c')
-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 {