diff options
author | mckusick <mckusick@FreeBSD.org> | 2015-07-19 22:25:16 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2015-07-19 22:25:16 +0000 |
commit | 8e58d9ecb417b58c5fad7f43272d5091f0bc0a9d (patch) | |
tree | 5de0b20cd500b27195c1e420485c53ccd12ee5af /sys/kern/kern_intr.c | |
parent | 2092d6ebaa81c46605e634d0491d84b53757d44f (diff) | |
download | FreeBSD-src-8e58d9ecb417b58c5fad7f43272d5091f0bc0a9d.zip FreeBSD-src-8e58d9ecb417b58c5fad7f43272d5091f0bc0a9d.tar.gz |
Restructure code for readability improvement. No functional change.
Reviewed by: kib
Diffstat (limited to 'sys/kern/kern_intr.c')
-rw-r--r-- | sys/kern/kern_intr.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 1aebbc1..111dcad 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -1231,17 +1231,14 @@ intr_event_execute_handlers(struct proc *p, struct intr_event *ie) * 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", |