diff options
| author | Warner Losh <imp@FreeBSD.org> | 2020-08-28 16:40:33 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2020-08-28 16:40:33 +0000 |
| commit | 1f7705606e8286960a2cea3d514a1deb5339047f (patch) | |
| tree | 3675ec36f0786fba2c5d406bfe8a06de0d8f8805 /sys/dev/speaker | |
| parent | 1cffe8b812e5efda80d7c68dab86d2e1906ef088 (diff) | |
Notes
Diffstat (limited to 'sys/dev/speaker')
| -rw-r--r-- | sys/dev/speaker/spkr.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index 9b5746d6cf92..5cef331eae5f 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -65,7 +65,7 @@ static void playstring(char *cp, size_t slen); static void tone(unsigned int thz, unsigned int centisecs) { - int sps, timo; + int timo; if (thz <= 0) return; @@ -75,14 +75,10 @@ tone(unsigned int thz, unsigned int centisecs) #endif /* DEBUG */ /* set timer to generate clicks at given frequency in Hertz */ - sps = splclock(); - if (timer_spkr_acquire()) { /* enter list of waiting procs ??? */ - splx(sps); return; } - splx(sps); disable_intr(); timer_spkr_setfreq(thz); enable_intr(); @@ -95,9 +91,7 @@ tone(unsigned int thz, unsigned int centisecs) timo = centisecs * hz / 100; if (timo > 0) tsleep(&endtone, SPKRPRI | PCATCH, "spkrtn", timo); - sps = splclock(); timer_spkr_release(); - splx(sps); } /* |
