mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-21 17:25:09 +00:00
Change the spkr_set_pitch() function to a macro to fix low level profiling.
This commit is contained in:
parent
7329f580c8
commit
f7965374d4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146721
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue