From fa97ea31316eb5cc9419496bdf153e41857196e6 Mon Sep 17 00:00:00 2001 From: Max Laier Date: Wed, 22 Sep 2004 20:55:56 +0000 Subject: [PATCH] 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 --- sys/net/pfil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/pfil.c b/sys/net/pfil.c index c995ec27cf1..942607c28cf 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)