summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/cpufunc.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-05-21 20:21:53 +0000
committerjhb <jhb@FreeBSD.org>2002-05-21 20:21:53 +0000
commit1a9e2f75a7848f318007acaac78c5571e3e83033 (patch)
treef0a028023cd692b0e46d479c253508cdb3866a7d /sys/amd64/include/cpufunc.h
parent8623a7bc17bf717c85ed19c0dcd320600b1360fb (diff)
downloadFreeBSD-src-1a9e2f75a7848f318007acaac78c5571e3e83033.zip
FreeBSD-src-1a9e2f75a7848f318007acaac78c5571e3e83033.tar.gz
Add an inline function cpu_pause() for the IA32 'pause' instruction.
Diffstat (limited to 'sys/amd64/include/cpufunc.h')
-rw-r--r--sys/amd64/include/cpufunc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index a77fda1..e0b7c99 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/include/cpufunc.h
@@ -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)
{
OpenPOWER on IntegriCloud