PERFORCE change 112983 for review
Paolo Pisati
piso at FreeBSD.org
Tue Jan 16 11:32:31 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=112983
Change 112983 by piso at piso_newluxor on 2007/01/16 11:31:42
Get rid of the spin lock acquisition in the callout path.
While here, do some spacing according to style.
Affected files ...
.. //depot/projects/soc2006/intr_filter/sparc64/sparc64/intr_machdep.c#20 edit
Differences ...
==== //depot/projects/soc2006/intr_filter/sparc64/sparc64/intr_machdep.c#20 (text+ko) ====
@@ -234,7 +234,7 @@
{
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);
}
/* Stray detection MD code */
@@ -242,9 +242,10 @@
walk_intr_sparc64(void) {
struct intr_vector *iv;
static int i = 0;
+ int j;
- for (; i<IV_MAX; ) {
- int j = i++;
+ for (; i<IV_MAX;) {
+ j = i++;
iv = &intr_vectors[j];
if (iv != NULL && iv->iv_event != NULL)
return (iv->iv_event);
@@ -257,10 +258,8 @@
intr_callout_reset(void)
{
- mtx_lock_spin(&intr_table_lock);
callout_reset(&stray_callout_handle, hz,
- &stray_detection, &walk_intr_sparc64);
- mtx_unlock_spin(&intr_table_lock);
+ &stray_detection, &walk_intr_sparc64);
}
static void
More information about the p4-projects
mailing list