summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2005-05-28 13:40:27 +0000
committernyan <nyan@FreeBSD.org>2005-05-28 13:40:27 +0000
commit23e73a4303a6e147663d73b99e11671a3c4b68b5 (patch)
treeb4c961108927bd3ebb21c9e9a0071fc4d5d5f326 /sys/pc98
parentfb931ae00a783cf793f2979c16143ef101daa124 (diff)
downloadFreeBSD-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/pc98')
-rw-r--r--sys/pc98/include/timerreg.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/pc98/include/timerreg.h b/sys/pc98/include/timerreg.h
index f9a36b7..59c223c 100644
--- a/sys/pc98/include/timerreg.h
+++ b/sys/pc98/include/timerreg.h
@@ -54,13 +54,11 @@
#define timer_spkr_release() \
release_timer1()
-static __inline void
-spkr_set_pitch(u_int16_t pitch)
-{
-
- outb(TIMER_CNTR1, pitch & 0xff);
- outb(TIMER_CNTR1, pitch >> 8);
-}
+#define spkr_set_pitch(pitch) \
+ do { \
+ outb(TIMER_CNTR1, (pitch) & 0xff); \
+ outb(TIMER_CNTR1, (pitch) >> 8); \
+ } while(0)
#endif /* _KERNEL */
OpenPOWER on IntegriCloud