Page MenuHomeFreeBSD

sound: Retire pcm_veto_load
ClosedPublic

Authored by christos on Fri, Oct 25, 12:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 11:58 AM
Unknown Object (File)
Wed, Nov 13, 4:07 PM
Unknown Object (File)
Mon, Nov 4, 1:26 AM
Unknown Object (File)
Sun, Nov 3, 1:27 PM
Unknown Object (File)
Sat, Nov 2, 11:57 AM
Unknown Object (File)
Fri, Nov 1, 9:14 PM
Unknown Object (File)
Mon, Oct 28, 8:15 PM
Unknown Object (File)
Mon, Oct 28, 7:43 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 Not Applicable
Unit
Tests Not Applicable

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.Tue, Oct 29, 12:02 AM
This revision was automatically updated to reflect the committed changes.