mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									96d2ab484e
								
							
						
					
					
						commit
						14e2acd868
					
				
					 1 changed files with 7 additions and 6 deletions
				
			
		| 
						 | 
					@ -986,10 +986,12 @@ asmlinkage int
 | 
				
			||||||
osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
 | 
					osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
 | 
				
			||||||
	   struct timeval32 __user *tvp)
 | 
						   struct timeval32 __user *tvp)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	s64 timeout = MAX_SCHEDULE_TIMEOUT;
 | 
						struct timespec end_time, *to = NULL;
 | 
				
			||||||
	if (tvp) {
 | 
						if (tvp) {
 | 
				
			||||||
		time_t sec, usec;
 | 
							time_t sec, usec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							to = &end_time;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp))
 | 
							if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp))
 | 
				
			||||||
		    || __get_user(sec, &tvp->tv_sec)
 | 
							    || __get_user(sec, &tvp->tv_sec)
 | 
				
			||||||
		    || __get_user(usec, &tvp->tv_usec)) {
 | 
							    || __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,
 | 
				
			||||||
		if (sec < 0 || usec < 0)
 | 
							if (sec < 0 || usec < 0)
 | 
				
			||||||
			return -EINVAL;
 | 
								return -EINVAL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if ((unsigned long) sec < MAX_SELECT_SECONDS) {
 | 
							if (poll_select_set_timeout(to, sec, usec * NSEC_PER_USEC))
 | 
				
			||||||
			timeout = (usec + 1000000/HZ - 1) / (1000000/HZ);
 | 
								return -EINVAL;		
 | 
				
			||||||
			timeout += sec * (unsigned long) HZ;
 | 
					
 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* OSF does not copy back the remaining time.  */
 | 
						/* OSF does not copy back the remaining time.  */
 | 
				
			||||||
	return core_sys_select(n, inp, outp, exp, &timeout);
 | 
						return core_sys_select(n, inp, outp, exp, to);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct rusage32 {
 | 
					struct rusage32 {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue