PERFORCE change 112977 for review
Paolo Pisati
piso at FreeBSD.org
Tue Jan 16 10:05:40 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=112977
Change 112977 by piso at piso_newluxor on 2007/01/16 10:05:22
Get rid of the lock in the callout path.
While here, fix some spacing and indentation.
Affected files ...
.. //depot/projects/soc2006/intr_filter/i386/i386/intr_machdep.c#28 edit
Differences ...
==== //depot/projects/soc2006/intr_filter/i386/i386/intr_machdep.c#28 (text+ko) ====
@@ -217,9 +217,10 @@
walk_intrs_src(void) {
struct intsrc *isrc;
static int i = 0;
+ int j;
- for (; i < NUM_IO_INTS; ) {
- int j = i++;
+ for (; i < NUM_IO_INTS;) {
+ j = i++;
isrc = interrupt_sources[j];
if (isrc != NULL && isrc->is_event != NULL)
return (isrc->is_event);
@@ -284,10 +285,8 @@
intr_callout_reset(void)
{
- mtx_lock_spin(&intr_table_lock);
callout_reset(&stray_callout_handle, hz,
- &stray_detection, &walk_intrs_src);
- mtx_unlock_spin(&intr_table_lock);
+ &stray_detection, &walk_intrs_src);
}
static void
@@ -385,7 +384,7 @@
intrcnt_index = 1;
STAILQ_INIT(&pics);
mtx_init(&intr_table_lock, "intr table", NULL, MTX_SPIN);
- callout_init_mtx(&stray_callout_handle, &intr_table_lock, 0);
+ callout_init(&stray_callout_handle, 1);
// XXX - we don't drain the callout...
}
SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL)
More information about the p4-projects
mailing list