From owner-svn-src-all@freebsd.org Sun Jul 19 22:25:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 713A99A47E2; Sun, 19 Jul 2015 22:25:17 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61FF11171; Sun, 19 Jul 2015 22:25:17 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6JMPH1A006146; Sun, 19 Jul 2015 22:25:17 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6JMPHFt006145; Sun, 19 Jul 2015 22:25:17 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201507192225.t6JMPHFt006145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 19 Jul 2015 22:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285705 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2015 22:25:17 -0000 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",