Change the spkr_set_pitch() function to a macro to fix low level profiling.

This commit is contained in:
Yoshihiro Takahashi 2005-05-28 13:40:27 +00:00
parent 7329f580c8
commit f7965374d4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146721
4 changed files with 20 additions and 28 deletions

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */