summaryrefslogtreecommitdiffstats
path: root/sys/net/pfil.c
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2013-03-19 05:51:47 +0000
committerae <ae@FreeBSD.org>2013-03-19 05:51:47 +0000
commitb3c4973a108184f747438794062bd3ccc98ed437 (patch)
tree195c49cef0f131f07f388498681cb7384f2b25d7 /sys/net/pfil.c
parent03b86a1452842fa3dbba615e64465e738982743f (diff)
downloadFreeBSD-src-b3c4973a108184f747438794062bd3ccc98ed437.zip
FreeBSD-src-b3c4973a108184f747438794062bd3ccc98ed437.tar.gz
Fix style and comments.
Diffstat (limited to 'sys/net/pfil.c')
-rw-r--r--sys/net/pfil.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/net/pfil.c b/sys/net/pfil.c
index 06da0be..9939d72 100644
--- a/sys/net/pfil.c
+++ b/sys/net/pfil.c
@@ -94,12 +94,13 @@ pfil_run_hooks(struct pfil_head *ph, struct mbuf **mp, struct ifnet *ifp,
/*
* pfil_try_rlock() acquires rm reader lock for specified head
- * if this is immediately possible,
+ * if this is immediately possible.
*/
int
pfil_try_rlock(struct pfil_head *ph, struct rm_priotracker *tracker)
{
- return PFIL_TRY_RLOCK(ph, tracker);
+
+ return (PFIL_TRY_RLOCK(ph, tracker));
}
/*
@@ -108,6 +109,7 @@ pfil_try_rlock(struct pfil_head *ph, struct rm_priotracker *tracker)
void
pfil_rlock(struct pfil_head *ph, struct rm_priotracker *tracker)
{
+
PFIL_RLOCK(ph, tracker);
}
@@ -117,6 +119,7 @@ pfil_rlock(struct pfil_head *ph, struct rm_priotracker *tracker)
void
pfil_runlock(struct pfil_head *ph, struct rm_priotracker *tracker)
{
+
PFIL_RUNLOCK(ph, tracker);
}
@@ -126,6 +129,7 @@ pfil_runlock(struct pfil_head *ph, struct rm_priotracker *tracker)
void
pfil_wlock(struct pfil_head *ph)
{
+
PFIL_WLOCK(ph);
}
@@ -135,16 +139,19 @@ pfil_wlock(struct pfil_head *ph)
void
pfil_wunlock(struct pfil_head *ph)
{
+
PFIL_WUNLOCK(ph);
}
/*
- * pfil_wowned() releases writer lock for specified head.
+ * pfil_wowned() returns a non-zero value if the current thread owns
+ * an exclusive lock.
*/
int
pfil_wowned(struct pfil_head *ph)
{
- return PFIL_WOWNED(ph);
+
+ return (PFIL_WOWNED(ph));
}
/*
* pfil_head_register() registers a pfil_head with the packet filter hook
OpenPOWER on IntegriCloud