patch-2.1.127 linux/arch/mips/kernel/irixsig.c

Next file: linux/arch/mips/kernel/sysirix.c
Previous file: linux/arch/m68k/atari/time.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.126/linux/arch/mips/kernel/irixsig.c linux/arch/mips/kernel/irixsig.c
@@ -568,7 +568,7 @@
 asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info,
 				struct timespec *tp)
 {
-	unsigned long expire = 0;
+	long expire = MAX_SCHEDULE_TIMEOUT;
 	sigset_t kset;
 	int i, sig, error, timeo = 0;
 
@@ -603,21 +603,21 @@
 			error = -EINVAL;
 			goto out;
 		}
-		expire = timespectojiffies(tp)+(tp->tv_sec||tp->tv_nsec)+jiffies;
-		current->timeout = expire;
+		expire = timespectojiffies(tp)+(tp->tv_sec||tp->tv_nsec);
 	}
 
 	while(1) {
 		long tmp = 0;
 
-		current->state = TASK_INTERRUPTIBLE; schedule();
+		current->state = TASK_INTERRUPTIBLE;
+		expire = schedule_timeout(expire);
 
 		for (i=0; i<=4; i++)
 			tmp |= (current->signal.sig[i] & kset.sig[i]);
 
 		if (tmp)
 			break;
-		if (tp && expire <= jiffies) {
+		if (!expire) {
 			timeo = 1;
 			break;
 		}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov