aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include/cpu.h
diff options
context:
space:
mode:
authorMaxime Henrion <mux@FreeBSD.org>2004-08-03 18:44:27 +0000
committerMaxime Henrion <mux@FreeBSD.org>2004-08-03 18:44:27 +0000
commit9f1b87f106100470dafeeab83abfa98ab86be3f7 (patch)
treede3272d2386247caa65d7fbb3bf4c7418c6ebc1b /sys/amd64/include/cpu.h
parent33282bf4aa28814e0065848bcba8d10b40bd4681 (diff)
downloadsrc-9f1b87f106100470dafeeab83abfa98ab86be3f7.tar.gz
src-9f1b87f106100470dafeeab83abfa98ab86be3f7.zip
Instead of calling ia32_pause() conditionally on __i386__ or __amd64__
being defined, define and use a new MD macro, cpu_spinwait(). It only expands to something on i386 and amd64, so the compiled code should be identical. Name of the macro found by: jhb Reviewed by: jhb
Notes
Notes: svn path=/head/; revision=133084
Diffstat (limited to 'sys/amd64/include/cpu.h')
-rw-r--r--sys/amd64/include/cpu.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h
index f8a2ee3fef0e..f069d2ebebb8 100644
--- a/sys/amd64/include/cpu.h
+++ b/sys/amd64/include/cpu.h
@@ -50,9 +50,10 @@
#undef COPY_SIGCODE /* don't copy sigcode above user stack in exec */
#define cpu_exec(p) /* nothing */
-#define cpu_swapin(p) /* nothing */
+#define cpu_swapin(p) /* nothing */
#define cpu_getstack(td) ((td)->td_frame->tf_rsp)
-#define cpu_setstack(td, ap) ((td)->td_frame->tf_rsp = (ap))
+#define cpu_setstack(td, ap) ((td)->td_frame->tf_rsp = (ap))
+#define cpu_spinwait() ia32_pause()
#define TRAPF_USERMODE(framep) \
(ISPL((framep)->tf_cs) == SEL_UPL)