PERFORCE change 115368 for review

Paolo Pisati piso at FreeBSD.org
Mon Mar 5 21:57:37 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=115368

Change 115368 by piso at piso_newluxor on 2007/03/05 21:56:49

	o Check for at least one handler among filt and ihand, else
	  return EINVAL.
	o Simplify a bit the filter handler wrapper, cause with the 
	  aforementioned check in place, we are sure there will always
	  be an ithread to run.

Affected files ...

.. //depot/projects/soc2006/intr_filter/dev/pccbb/pccbb.c#13 edit

Differences ...

==== //depot/projects/soc2006/intr_filter/dev/pccbb/pccbb.c#13 (text+ko) ====

@@ -367,6 +367,8 @@
 	struct cbb_softc *sc = device_get_softc(dev);
 	int err;
 
+	if (filt == NULL && intr == NULL)
+		return (EINVAL);
 	/*
 	 * Well, this is no longer strictly true.  You can have multiple
 	 * FAST ISRs, but can't mix fast and slow, so we have to assume
@@ -636,12 +638,8 @@
 	 * in the ISR dispatch
 	 */
 	if (ih->filt != NULL)
-		return ((*ih->filt)(ih->arg));
-
-	if (ih->intr != NULL)
-		return (FILTER_HANDLED | FILTER_SCHEDULE_THREAD);
-	else
-		return (FILTER_STRAY);
+		return ((*ih->filt)(ih->arg));	
+	return (FILTER_HANDLED | FILTER_SCHEDULE_THREAD);
 }
 
 static void


More information about the p4-projects mailing list