HomeFreeBSD

sound: Do not access cv_waiters

Description

sound: Do not access cv_waiters

Remove uses of cv_waiters in PCM_RELEASE and CHN_BROADCAST, and also use
a counter around cv_timedwait_sig() in chn_sleep(), which is checked in
pcm_killchans(), as opposed to reading cv_waiters directly, which is a
layering violation.

While here, move CHN_BROADCAST below the channel lock operations.

Reported by: avg, jhb, markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, avg
Differential Revision: https://reviews.freebsd.org/D47780

Details

Provenance
christosAuthored on Mon, Dec 2, 4:26 PM
Reviewer
dev_submerge.ch
Differential Revision
D47780: sound: Do not access cv_waiters
Parents
rG29ba0cc4d919: sound: Fix mis-sorted CHN_F_BITS line
Branches
Unknown
Tags
Unknown