Add an inline function cpu_pause() for the IA32 'pause' instruction.
This commit is contained in:
parent
8623a7bc17
commit
1a9e2f75a7
@ -560,6 +560,12 @@ load_dr7(u_int sel)
|
||||
__asm __volatile("movl %0,%%dr7" : : "r" (sel));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
cpu_pause(void)
|
||||
{
|
||||
__asm __volatile("pause");
|
||||
}
|
||||
|
||||
static __inline register_t
|
||||
intr_disable(void)
|
||||
{
|
||||
|
@ -560,6 +560,12 @@ load_dr7(u_int sel)
|
||||
__asm __volatile("movl %0,%%dr7" : : "r" (sel));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
cpu_pause(void)
|
||||
{
|
||||
__asm __volatile("pause");
|
||||
}
|
||||
|
||||
static __inline register_t
|
||||
intr_disable(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user