diff options
author | jhb <jhb@FreeBSD.org> | 2005-06-20 19:32:23 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-06-20 19:32:23 +0000 |
commit | a5e3094bcf0d4451cc97aed4e0d3a28cb16faaf1 (patch) | |
tree | 1c607f48cbc1d08661317f9219ea7ca5615e7fa0 /sys/kern/kern_intr.c | |
parent | 7af4f5af38cfb09705bcb5eaae8d10dcffb986ba (diff) | |
download | FreeBSD-src-a5e3094bcf0d4451cc97aed4e0d3a28cb16faaf1.zip FreeBSD-src-a5e3094bcf0d4451cc97aed4e0d3a28cb16faaf1.tar.gz |
Simplify the storming logic and remove a variable as a result.
Approved by: re (dwhite)
Diffstat (limited to 'sys/kern/kern_intr.c')
-rw-r--r-- | sys/kern/kern_intr.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 837a2bb..83ea2b1 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -484,7 +484,7 @@ ithread_loop(void *arg) struct intrhand *ih; /* and our interrupt handler chain */ struct thread *td; struct proc *p; - int count, warned, storming; + int count, warned; td = curthread; p = td->td_proc; @@ -493,7 +493,6 @@ ithread_loop(void *arg) ("%s: ithread and proc linkage out of sync", __func__)); count = 0; warned = 0; - storming = 0; /* * As long as we have interrupts outstanding, go through the @@ -560,7 +559,7 @@ restart: * interrupts exceeds the storm threshold, then * enter storming mode. */ - if (!storming && intr_storm_threshold != 0 && + if (intr_storm_threshold != 0 && count >= intr_storm_threshold) { if (!warned) { printf( @@ -568,11 +567,8 @@ restart: p->p_comm); warned = 1; } - storming = 1; - } - if (storming) tsleep(&count, td->td_priority, "istorm", 1); - else + } else count++; if (ithd->it_enable != NULL) @@ -590,7 +586,6 @@ restart: if (!ithd->it_need) { TD_SET_IWAIT(td); count = 0; - storming = 0; CTR2(KTR_INTR, "%s: pid %d: done", __func__, p->p_pid); mi_switch(SW_VOL, NULL); CTR2(KTR_INTR, "%s: pid %d: resumed", __func__, p->p_pid); |