Page MenuHomeFreeBSD

sound: Retire pcm_veto_load
ClosedPublic

Authored by christos on Oct 25 2024, 12:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 12, 2:09 PM
Unknown Object (File)
Thu, Nov 28, 2:30 AM
Unknown Object (File)
Nov 27 2024, 1:05 AM
Unknown Object (File)
Nov 26 2024, 4:24 PM
Unknown Object (File)
Nov 23 2024, 2:06 PM
Unknown Object (File)
Nov 23 2024, 1:11 PM
Unknown Object (File)
Nov 14 2024, 11:58 AM
Unknown Object (File)
Nov 13 2024, 4:07 PM
Subscribers

Details

Summary

pcm_veto_load is used to prevent pcm_register() from running if the root
feeder has not been registered yet. However, feeder_register_root() is a
SYSINIT.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days

Diff Detail

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

Event Timeline

Also note that pcm_register() does not really touch the root feeder in the first place.

sys/dev/sound/pcm/feeder.c
65

Could the M_WAITOK be a problem (i.e we sleep here and pcm_register() continues normally)?

pcm_veto_load is used to prevent pcm_register() from running if the root feeder has not been registered yet. However, feeder_register_root() is a SYSINIT.

So are the functions which call pcm_register(), albeit indirectly. The point is probably to make sure that feeder_register_root() runs first. See the use of SI_ORDER_FIRST in the SYSINIT definition.

Also note that pcm_register() does not really touch the root feeder in the first place.

It doesn't, but functions like pcm_addchan(), called after pcm_register(), do.

I'd at least add a comment above the SYSINIT definition explaining why this one comes first.

This revision is now accepted and ready to land.Oct 29 2024, 12:02 AM
This revision was automatically updated to reflect the committed changes.