summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2014-07-19 05:27:18 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2014-07-19 05:27:18 +0000
commit4c35363e161dd51eab6bb955b964fcd01278caaa (patch)
treee2b0fcb6fb3580f8c2f1881d152c6d4cb18b949e /sys
parentb1e7cee53014eadd6a817d7e70a1ca7aef9c925f (diff)
miod pointed out i forgot which way round casts go.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/vax/include/atomic.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/arch/vax/include/atomic.h b/sys/arch/vax/include/atomic.h
index 6a35b0f8146..0a2c907f538 100644
--- a/sys/arch/vax/include/atomic.h
+++ b/sys/arch/vax/include/atomic.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atomic.h,v 1.8 2014/07/18 10:40:14 dlg Exp $ */
+/* $OpenBSD: atomic.h,v 1.9 2014/07/19 05:27:17 dlg Exp $ */
/* Public Domain */
@@ -93,20 +93,21 @@ atomic_swap_uint_sp(unsigned int *p, unsigned int v)
#define atomic_swap_uint atomic_swap_uint_sp
#define atomic_add_long_nv(p,v) \
- ((unsigned long)atomic_add_int_nv((unsigned long *)p, (unsigned long)v))
+ ((unsigned long)atomic_add_int_nv((unsigned int *)p, (unsigned int)v))
#define atomic_sub_long_nv(p,v) \
- ((unsigned long)atomic_sub_int_nv((unsigned long *)p, (unsigned long)v))
+ ((unsigned long)atomic_sub_int_nv((unsigned int *)p, (unsigned int)v))
#define atomic_cas_ulong(p,o,n) \
- ((unsigned long)atomic_cas_uint((unsigned long *)p, (unsigned long)o, \
- (unsigned long)n))
+ ((unsigned long)atomic_cas_uint((unsigned int *)p, (unsigned int)o, \
+ (unsigned int)n))
#define atomic_cas_ptr(p,o,n) \
- ((void *)atomic_cas_uint((void *)p, (void *)o, (void *)n))
+ ((void *)atomic_cas_uint((unsigned int *)p, (unsigned int)o, \
+ (unsigned int)n))
#define atomic_swap_ulong(p,o) \
- ((unsigned long)atomic_swap_uint((unsigned long *)p, (unsigned long)o)
+ ((unsigned long)atomic_swap_uint((unsigned int *)p, (unsigned int)o)
#define atomic_swap_ptr(p,o) \
- ((void *)atomic_swap_uint((void *)p, (void *)o))
+ ((void *)atomic_swap_uint((unsigned int *)p, (unsigned int)o))
static inline void
__sync_synchronize(void)