]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove splclock(). It's not useful to keep.
authorWarner Losh <imp@FreeBSD.org>
Fri, 28 Aug 2020 16:40:33 +0000 (16:40 +0000)
committerWarner Losh <imp@FreeBSD.org>
Fri, 28 Aug 2020 16:40:33 +0000 (16:40 +0000)
commit1f7705606e8286960a2cea3d514a1deb5339047f
tree3675ec36f0786fba2c5d406bfe8a06de0d8f8805
parent1cffe8b812e5efda80d7c68dab86d2e1906ef088
Remove splclock(). It's not useful to keep.

splclock is used in one driver (spkr) to control access to
timer_spkr_* routines.  However, nothing else does. So it shows no
useful locking info to someone that would want to lock spkr.

NOTE: I think there's races with timer_spkr_{acquire,release} since
there's no interlock in those routines, despite there being a spin
lock to protect the clock. Current other users appear to use no extra
locking protocol, though they themselves appear to be at least
attempting to make sure that only a single thread calls these
routines. I suspect the right answer is to update these routines to
take/release the clock spin lock since they are short and to the
point, but that's beyond the scope of this commit.
sys/dev/speaker/spkr.c
sys/sys/systm.h