Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/include Revise rhetoric for why __HAVE_ATOMIC6...



details:   https://anonhg.NetBSD.org/src/rev/bc2125617aa6
branches:  trunk
changeset: 337662:bc2125617aa6
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Apr 22 19:48:01 2015 +0000

description:
Revise rhetoric for why __HAVE_ATOMIC64_OPS is defined with _KERNEL even
though we don't know for sure that the target i386 CPU will support them.

diffstat:

 sys/arch/i386/include/types.h |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (27 lines):

diff -r f8c85398ce17 -r bc2125617aa6 sys/arch/i386/include/types.h
--- a/sys/arch/i386/include/types.h     Wed Apr 22 19:46:08 2015 +0000
+++ b/sys/arch/i386/include/types.h     Wed Apr 22 19:48:01 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: types.h,v 1.79 2014/04/24 19:23:00 christos Exp $      */
+/*     $NetBSD: types.h,v 1.80 2015/04/22 19:48:01 pooka Exp $ */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -109,12 +109,13 @@
 #define        __HAVE_SYSCALL_INTERN
 #define        __HAVE_MINIMAL_EMUL
 #define        __HAVE_OLD_DISKLABEL
-#if defined(_KERNEL) && !defined(_RUMPKERNEL) && !defined(_RUMP_NATIVE_ABI)
+#if defined(_KERNEL)
 /*
  * Processors < i586 do not have cmpxchg8b, and we compile for i486
- * by default in userland. The kernel tsc driver uses them though,
- * and handles < i586 * by patching. We don't want to expose them in
- * userland, that is why we exclude rump.
+ * by default. The kernel tsc driver uses them though, and handles < i586
+ * by patching.  E.g. rump kernels and crash(8) and a selection of
+ * other run-in-userspace code defines _KERNEL, but is careful not to
+ * build anything using 64bit atomic ops by default.
  */
 #define __HAVE_ATOMIC64_OPS
 #endif



Home | Main Index | Thread Index | Old Index