summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/atomic.h
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2006-12-28 08:15:14 +0000
committerbde <bde@FreeBSD.org>2006-12-28 08:15:14 +0000
commit54df184a65df46b01dbedeb63328f3dc33174d78 (patch)
treeebde4a6c9cf431a608c383b8257520010ee7f752 /sys/amd64/include/atomic.h
parent9983d83070f8e44c29aaf04955cc10bc3659af17 (diff)
downloadFreeBSD-src-54df184a65df46b01dbedeb63328f3dc33174d78.zip
FreeBSD-src-54df184a65df46b01dbedeb63328f3dc33174d78.tar.gz
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).
Diffstat (limited to 'sys/amd64/include/atomic.h')
-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 d65d3a9..f8cda31 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
OpenPOWER on IntegriCloud