| 665 | } |
| 666 | |
| 667 | int |
| 668 | sysbeep(int pitch, int period) |
| 669 | { |
| 670 | |
| 671 | if (timer_spkr_acquire()) { |
| 672 | if (!beeping) { |
| 673 | /* Something else owns it. */ |
| 674 | return (EBUSY); |
| 675 | } |
| 676 | } |
| 677 | timer_spkr_setfreq(pitch); |
| 678 | if (!beeping) { |
| 679 | beeping = period; |
| 680 | callout_reset(&beeping_timer, period, sysbeepstop, NULL); |
| 681 | } |
| 682 | return (0); |
| 683 | } |
| 684 | |
| 685 | static void |
| 686 | sysbeep_init(void *unused) |
no test coverage detected