Page MenuHomeFreeBSD

sound: Move sysctl and /dev/dspX creation to pcm_setstatus()
ClosedPublic

Authored by christos on Oct 28 2024, 10:30 PM.
Tags
None
Referenced Files
F136116731: D47322.id145954.diff
Sat, Nov 15, 10:13 PM
F136028875: D47322.id.diff
Sat, Nov 15, 5:43 AM
Unknown Object (File)
Sun, Nov 9, 4:54 PM
Unknown Object (File)
Sat, Nov 8, 8:17 PM
Unknown Object (File)
Fri, Nov 7, 12:28 PM
Unknown Object (File)
Wed, Nov 5, 5:07 PM
Unknown Object (File)
Wed, Nov 5, 5:48 AM
Unknown Object (File)
Sun, Nov 2, 5:32 AM
Subscribers

Details

Summary

Create the sysctl and /dev/dsp* nodes in pcm_setstatus(), which is
responsible for finalizing the device initialization, instead of doing
this in the middle of the initialization.

For the sysctl creation specifically, move them into pcm_sysinit(),
since this is where we create the rest of the sysctl nodes anyway.

A side effect of this change is, that we avoid the possibility of racing
in between pcm_register() and pcm_setstatus() by accessing /dev/dspX or
the sysctls within that window.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable