Page MenuHomeFreeBSD

sound: Retire snd_mixer->busy
ClosedPublic

Authored by christos on Fri, Nov 21, 5:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 8, 8:13 AM
Unknown Object (File)
Thu, Dec 4, 7:34 AM
Unknown Object (File)
Wed, Dec 3, 6:56 AM
Unknown Object (File)
Sun, Nov 30, 2:28 PM
Unknown Object (File)
Sat, Nov 29, 1:24 PM
Unknown Object (File)
Thu, Nov 27, 10:41 PM
Unknown Object (File)
Wed, Nov 26, 7:28 PM
Unknown Object (File)
Sun, Nov 23, 11:53 AM
Subscribers

Details

Summary

Does not really serve any real purpose. It gets set on mixer_open() and
unset on mixer_close(), so it essentially tells us whether the mixer is
open or not.

mixer_close() uses it to return EBADF in case the mixer is not busied,
as in, the mixer has not been open()'d yet. This is redundant. The other
place where this is used is to decide whether to serve an ioctl issued
by userland, in which case it won't if, again, the mixer has not been
busied (i.e., opened). Again, seems redundant.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 68785
Build 65668: arc lint + arc unit

Event Timeline

markj added inline comments.
sys/dev/sound/pci/es137x.c
1543

Was the busy state just getting leaked here?

This revision is now accepted and ready to land.Fri, Nov 28, 2:03 PM
sys/dev/sound/pci/es137x.c
1543

I don't think so. The busy state was set in mixer_open() (i.e., open(2) for /dev/mixer), and cleared in mixer_close().

This revision was automatically updated to reflect the committed changes.