patch-2.3.43 linux/kernel/itimer.c
Next file: linux/kernel/ksyms.c
Previous file: linux/kernel/exit.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Wed Feb 9 20:08:09 2000
- Orig file:
v2.3.42/linux/kernel/itimer.c
- Orig date:
Tue Aug 31 17:29:15 1999
diff -u --recursive --new-file v2.3.42/linux/kernel/itimer.c linux/kernel/itimer.c
@@ -48,7 +48,9 @@
case ITIMER_REAL:
interval = current->it_real_incr;
val = 0;
- start_bh_atomic();
+ /*
+ * FIXME! This needs to be atomic, in case the kernel timer happens!
+ */
if (timer_pending(¤t->real_timer)) {
val = current->real_timer.expires - jiffies;
@@ -56,7 +58,6 @@
if ((long) val <= 0)
val = 1;
}
- end_bh_atomic();
break;
case ITIMER_VIRTUAL:
val = current->it_virt_value;
@@ -102,6 +103,7 @@
p->real_timer.expires = jiffies + interval;
add_timer(&p->real_timer);
}
+ timer_exit(&p->real_timer);
}
int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue)
@@ -115,9 +117,7 @@
return k;
switch (which) {
case ITIMER_REAL:
- start_bh_atomic();
- del_timer(¤t->real_timer);
- end_bh_atomic();
+ del_timer_sync(¤t->real_timer);
current->it_real_value = j;
current->it_real_incr = i;
if (!j)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)