aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2006-12-28 08:15:14 +0000
committerBruce Evans <bde@FreeBSD.org>2006-12-28 08:15:14 +0000
commit276c702d8d384d12dcd8f2b28e67a97f59e0c790 (patch)
treeebde4a6c9cf431a608c383b8257520010ee7f752 /sys/amd64/include
parent9d1f363daf5bc74c3d9d5586c8658a7da94d8b91 (diff)
downloadsrc-276c702d8d384d12dcd8f2b28e67a97f59e0c790.tar.gz
src-276c702d8d384d12dcd8f2b28e67a97f59e0c790.zip
Removed gratuitous cosmetic differences with the i386 version. This
mainly involves removing all __CC_SUPPORTS___INLINE__ ifdefs. These ifdefs are even less needed for amd64 than for i386, but the i386 atomic.h never had them. The ifdefs here were just an optimization of obsolescent compatibility cruft (__inline) for a null set of compilers. I think null sets of compilers should only be supported in cases where this is more than an optimization, doesn't require extensive ifdefs, and only involves not-so-obsolescent compatibility cruft (plain inline here).
Notes
Notes: svn path=/head/; revision=165578
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/atomic.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h
index d65d3a9abc14..f8cda3128e5a 100644
--- a/sys/amd64/include/atomic.h
+++ b/sys/amd64/include/atomic.h
@@ -67,7 +67,7 @@
* Kernel modules call real functions which are built into the kernel.
* This allows kernel modules to be portable between UP and SMP systems.
*/
-#if defined(KLD_MODULE) || !(defined(__GNUCLIKE_ASM) && defined(__CC_SUPPORTS___INLINE))
+#if defined(KLD_MODULE) || !defined(__GNUCLIKE_ASM)
#define ATOMIC_ASM(NAME, TYPE, OP, CONS, V) \
void atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v)
@@ -79,7 +79,7 @@ u_int atomic_fetchadd_int(volatile u_int *p, u_int v);
u_##TYPE atomic_load_acq_##TYPE(volatile u_##TYPE *p); \
void atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)
-#else /* !KLD_MODULE && __GNUCLIKE_ASM && __CC_SUPPORTS___INLINE */
+#else /* !KLD_MODULE && __GNUCLIKE_ASM */
/*
* For userland, assume the SMP case and use lock prefixes so that
@@ -209,7 +209,7 @@ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \
: "=a" (res), /* 0 (result) */\
"=m" (*p) /* 1 */ \
: "m" (*p) /* 2 */ \
- : "memory"); \
+ : "memory"); \
\
return (res); \
} \
@@ -229,7 +229,7 @@ struct __hack
#endif /* SMP */
-#endif /* KLD_MODULE || !(__GNUCLIKE_ASM && __CC_SUPPORTS___INLINE) */
+#endif /* KLD_MODULE || !__GNUCLIKE_ASM */
ATOMIC_ASM(set, char, "orb %b1,%0", "iq", v);
ATOMIC_ASM(clear, char, "andb %b1,%0", "iq", ~v);
@@ -262,7 +262,7 @@ ATOMIC_STORE_LOAD(long, "cmpxchgq %0,%1", "xchgq %1,%0");
#if !defined(WANT_FUNCTIONS)
/* Read the current value and store a zero in the destination. */
-#if defined(__GNUCLIKE_ASM) && defined(__CC_SUPPORTS___INLINE)
+#ifdef __GNUCLIKE_ASM
static __inline u_int
atomic_readandclear_int(volatile u_int *addr)
@@ -296,12 +296,12 @@ atomic_readandclear_long(volatile u_long *addr)
return (result);
}
-#else /* !(__GNUCLIKE_ASM && __CC_SUPPORTS___INLINE) */
+#else /* !__GNUCLIKE_ASM */
u_int atomic_readandclear_int(volatile u_int *);
u_long atomic_readandclear_long(volatile u_long *);
-#endif /* __GNUCLIKE_ASM && __CC_SUPPORTS___INLINE */
+#endif /* __GNUCLIKE_ASM */
/* Acquire and release variants are identical to the normal ones. */
#define atomic_set_acq_char atomic_set_char