patch-1.3.14 linux/kernel/itimer.c

Next file: linux/kernel/sched.c
Previous file: linux/include/net/netrom.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.13/linux/kernel/itimer.c linux/kernel/itimer.c
@@ -38,7 +38,7 @@
 		interval = current->it_real_incr;
 		val = 0;
 		if (del_timer(&current->real_timer)) {
-			val = current->real_timer.expires;
+			val = current->real_timer.expires-jiffies;
 			add_timer(&current->real_timer);
 			if (val <= 0)
 				val = interval;
@@ -83,7 +83,7 @@
 
 	send_sig(SIGALRM, p, 1);
 	if (p->it_real_incr) {
-		p->real_timer.expires = p->it_real_incr;
+		p->real_timer.expires = jiffies+p->it_real_incr;
 		add_timer(&p->real_timer);
 	}
 }
@@ -101,7 +101,7 @@
 		case ITIMER_REAL:
 			del_timer(&current->real_timer);
 			if (j) {
-				current->real_timer.expires = j;
+				current->real_timer.expires = jiffies+j;
 				add_timer(&current->real_timer);
 			}
 			current->it_real_value = j;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this