summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2004-09-22 20:55:56 +0000
committermlaier <mlaier@FreeBSD.org>2004-09-22 20:55:56 +0000
commit8c87efffcd54ec9bb5a3769c9794bf07e3061ee8 (patch)
treeb565a3db19509eabac8cb92b1fc36ed81226cb2e /sys/net
parent197eb4f541c434d925758f42a7c94b2fb851c129 (diff)
downloadFreeBSD-src-8c87efffcd54ec9bb5a3769c9794bf07e3061ee8.zip
FreeBSD-src-8c87efffcd54ec9bb5a3769c9794bf07e3061ee8.tar.gz
Switch order for mtx_unlock and cv_signal as (condvar(9)) sez:
A thread must hold mp while calling cv_signal(), cv_broadcast(), or cv_broadcastpri() even though it isn't passed as an argument. and is right with this claim. While here remove a "\" from the macro -> __inline conversion. Found by: csjp MFC after: 4 days
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pfil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pfil.c b/sys/net/pfil.c
index c995ec2..942607c 100644
--- a/sys/net/pfil.c
+++ b/sys/net/pfil.c
@@ -100,9 +100,9 @@ PFIL_TRY_WLOCK(struct pfil_head *ph)
static __inline void
PFIL_WUNLOCK(struct pfil_head *ph)
{
- ph->ph_want_write = 0; \
- mtx_unlock(&ph->ph_mtx);
+ ph->ph_want_write = 0;
cv_signal(&ph->ph_cv);
+ mtx_unlock(&ph->ph_mtx);
}
#define PFIL_LIST_LOCK() mtx_lock(&pfil_global_lock)
OpenPOWER on IntegriCloud