From 314eb4e1e0bfbbb1f8ddb3f875cc5091644e07be Mon Sep 17 00:00:00 2001 From: dlg Date: Sat, 19 Jul 2014 05:27:17 +0000 Subject: [PATCH] miod pointed out i forgot which way round casts go. --- sys/arch/vax/include/atomic.h | 17 +++++++++-------- 1 file 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) -- 2.20.1