Date: Tue, 16 Jan 2007 10:05:39 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 112977 for review Message-ID: <200701161005.l0GA5deK080165@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112977 Change 112977 by piso@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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701161005.l0GA5deK080165>