svn commit: r285705 - head/sys/kern

Kirk McKusick mckusick at FreeBSD.org
Sun Jul 19 22:25:17 UTC 2015


Author: mckusick
Date: Sun Jul 19 22:25:16 2015
New Revision: 285705
URL: https://svnweb.freebsd.org/changeset/base/285705

Log:
  Restructure code for readability improvement. No functional change.
  
  Reviewed by: kib

Modified:
  head/sys/kern/kern_intr.c

Modified: head/sys/kern/kern_intr.c
==============================================================================
--- head/sys/kern/kern_intr.c	Sun Jul 19 22:24:33 2015	(r285704)
+++ head/sys/kern/kern_intr.c	Sun Jul 19 22:25:16 2015	(r285705)
@@ -1231,17 +1231,14 @@ intr_event_execute_handlers(struct proc 
 		 * For software interrupt threads, we only execute
 		 * handlers that have their need flag set.  Hardware
 		 * interrupt threads always invoke all of their handlers.
+		 *
+		 * ih_need can only be 0 or 1.  Failed cmpset below
+		 * means that there is no request to execute handlers,
+		 * so a retry of the cmpset is not needed.
 		 */
-		if ((ie->ie_flags & IE_SOFT) != 0) {
-			/*
-			 * ih_need can only be 0 or 1.  Failed cmpset
-			 * below means that there is no request to
-			 * execute handlers, so a retry of the cmpset
-			 * is not needed.
-			 */
-			if (atomic_cmpset_int(&ih->ih_need, 1, 0) == 0)
-				continue;
-		}
+		if ((ie->ie_flags & IE_SOFT) != 0 &&
+		    atomic_cmpset_int(&ih->ih_need, 1, 0) == 0)
+			continue;
 
 		/* Execute this handler. */
 		CTR6(KTR_INTR, "%s: pid %d exec %p(%p) for %s flg=%x",


More information about the svn-src-all mailing list