diff options
author | nyan <nyan@FreeBSD.org> | 2005-05-28 13:40:27 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2005-05-28 13:40:27 +0000 |
commit | 23e73a4303a6e147663d73b99e11671a3c4b68b5 (patch) | |
tree | b4c961108927bd3ebb21c9e9a0071fc4d5d5f326 /sys/i386 | |
parent | fb931ae00a783cf793f2979c16143ef101daa124 (diff) | |
download | FreeBSD-src-23e73a4303a6e147663d73b99e11671a3c4b68b5.zip FreeBSD-src-23e73a4303a6e147663d73b99e11671a3c4b68b5.tar.gz |
Change the spkr_set_pitch() function to a macro to fix low level profiling.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/include/timerreg.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/i386/include/timerreg.h b/sys/i386/include/timerreg.h index 34e59e0..0ab7d40 100644 --- a/sys/i386/include/timerreg.h +++ b/sys/i386/include/timerreg.h @@ -54,13 +54,11 @@ #define timer_spkr_release() \ release_timer2() -static __inline void -spkr_set_pitch(u_int16_t pitch) -{ - - outb(TIMER_CNTR2, pitch & 0xff); - outb(TIMER_CNTR2, pitch >> 8); -} +#define spkr_set_pitch(pitch) \ + do { \ + outb(TIMER_CNTR2, (pitch) & 0xff); \ + outb(TIMER_CNTR2, (pitch) >> 8); \ + } while(0) #endif /* _KERNEL */ |