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:
parent
b9268aabb7
commit
fa97ea3131
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue