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
This commit is contained in:
Max Laier 2004-09-22 20:55:56 +00:00
parent b9268aabb7
commit fa97ea3131

View file

@ -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)