freebsd-src icon indicating copy to clipboard operation
freebsd-src copied to clipboard

speaker(4): drop NEEDGIANT

Open knz opened this issue 2 weeks ago • 1 comments

NB: I have also uploaded this in Phabricator as https://reviews.freebsd.org/D54168

Summary: the calls to disable_intr() / enable_intr() in spkr.c were leftover from previous refactorings and unnecessary for correctness, so this PR removes them.

My detailed analysis of why this change is correct can be found here: spkr.md

The main related commit referenced in the analysis is this 2008 change by phk: e46598588587b4897f6604489364f83fffd4d033 - where a mutex was added to clock.c and the disable_intr/enable_intr pair could have been removed, but wasn't.

Motivation: I am a fervent spkr(4) user and would like it to persist beyond FreeBSD 16, so we needed to do something about its use of the GIANT mutex.

cc @bsdphk @bsdimp

knz avatar Dec 10 '25 20:12 knz

Thank you for taking the time to contribute to FreeBSD! All issues resolved.

github-actions[bot] avatar Dec 10 '25 20:12 github-actions[bot]