summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2008-04-08 16:34:50 +0000
committermarcel <marcel@FreeBSD.org>2008-04-08 16:34:50 +0000
commitdb3fbb6a27cc943c342ace34cf3ec9250a366b38 (patch)
treec26a526fd67d70038994e9f3e6ff0f307c45c2d1 /sys/powerpc
parentec844a0ec07cb75eef07f6ae8adae0dd1bb45248 (diff)
downloadFreeBSD-src-db3fbb6a27cc943c342ace34cf3ec9250a366b38.zip
FreeBSD-src-db3fbb6a27cc943c342ace34cf3ec9250a366b38.tar.gz
Quick fix for the kernel build breakage in netgraph and the
aliasing warning in libthr. A more elaborate fix is in the works that makes sure that all variants have proper inline functions with proper types.
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/include/atomic.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h
index 0d1e3c1..05bdb95 100644
--- a/sys/powerpc/include/atomic.h
+++ b/sys/powerpc/include/atomic.h
@@ -226,8 +226,10 @@ atomic_readandclear_64(volatile u_int64_t *addr)
#define atomic_set_long atomic_set_32
#define atomic_clear_long atomic_clear_32
-#define atomic_add_long(p, v) atomic_add_32((uint32_t *)p, (uint32_t)v)
-#define atomic_subtract_long(p, v) atomic_subtract_32((uint32_t *)p, (uint32_t)v)
+#define atomic_add_long(p, v) \
+ atomic_add_32((volatile uint32_t *)(volatile void *)p, v)
+#define atomic_subtract_long(p, v) \
+ atomic_subtract_32((volatile uint32_t *)(volatile void *)p, v)
#define atomic_readandclear_long atomic_readandclear_32
#define atomic_set_ptr atomic_set_32
OpenPOWER on IntegriCloud