Date: Sat, 1 Mar 2003 17:16:30 -0800 (PST) From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 26152 for review Message-ID: <200303020116.h221GU93073831@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=26152 Change 26152 by jmallett@jmallett_dalek on 2003/03/01 17:16:12 Add volatile qualifiers so GCC will shut up. Fix some nearby macro botches and style craptacularocity. Affected files ... .. //depot/projects/mips/sys/mips/include/atomic.h#12 edit Differences ... ==== //depot/projects/mips/sys/mips/include/atomic.h#12 (text+ko) ==== @@ -37,7 +37,7 @@ #define ATOMIC_ACQ_OP(type, op) \ static __inline void \ -atomic_ ## op ## _acq_ ## type(u_ ## type *p, u_ ## type val) \ +atomic_ ## op ## _acq_ ## type(volatile u_ ## type *p, u_ ## type val) \ { \ atomic_ ## op ## _ ## type(p, val); \ mips_write_membar(); \ @@ -45,7 +45,7 @@ #define ATOMIC_REL_OP(type, op) \ static __inline void \ -atomic_ ## op ## _rel_ ## type(u_ ## type *p, u_ ## type val) \ +atomic_ ## op ## _rel_ ## type(volatile u_ ## type *p, u_ ## type val) \ { \ mips_read_membar(); \ atomic_ ## op ## _ ## type(p, val); \ @@ -53,7 +53,7 @@ #define ATOMIC_ACQ_LOAD(type) \ static __inline u_ ## type \ -atomic_load_ ## type (u_ ## type *p) \ +atomic_load_acq_ ## type(volatile u_ ## type *p) \ { \ u_ ## type res; \ \ @@ -65,7 +65,7 @@ #define ATOMIC_REL_STORE(type) \ static __inline void \ -atomic_store_rel_ ## type (u_ ## type *p, u_ ## type val) \ +atomic_store_rel_ ## type(volatile u_ ## type *p, u_ ## type val) \ { \ mips_read_membar(); \ *p = val; \ @@ -77,7 +77,7 @@ #define ATOMIC_OP(op, asmop) \ static __inline void \ -atomic_ ## op ## _int(u_int *p, u_int val) \ +atomic_ ## op ## _int(volatile u_int *p, u_int val) \ { \ u_int temp; \ \ @@ -111,7 +111,7 @@ ATOMIC_REL_STORE(int) static __inline int -atomic_cmpset_int(u_int *p, u_int old, u_int val) +atomic_cmpset_int(volatile u_int *p, u_int old, u_int val) { u_int temp; int res; @@ -135,7 +135,7 @@ } static __inline u_int -atomic_readandclear_int(u_int *p) +atomic_readandclear_int(volatile u_int *p) { u_int temp, res; @@ -162,7 +162,7 @@ #define ATOMIC_DOP(op, asmop) \ static __inline void \ -atomic_ ## op ## _long(u_long *p, u_long val) \ +atomic_ ## op ## _long(volatile u_long *p, u_long val) \ { \ u_long temp; \ \ @@ -196,7 +196,7 @@ ATOMIC_REL_STORE(long) static __inline int -atomic_cmpset_long(u_long *p, u_long old, u_long val) +atomic_cmpset_long(volatile u_long *p, u_long old, u_long val) { u_long temp; int res; @@ -220,7 +220,7 @@ } static __inline u_long -atomic_readandclear_long(u_long *p) +atomic_readandclear_long(volatile u_long *p) { u_long temp, res; @@ -246,17 +246,17 @@ */ #define ATOMIC_POP(op) \ static __inline void \ -atomic_ ## op ## _ptr(void *p, uintptr_t val) \ +atomic_ ## op ## _ptr(volatile void *p, uintptr_t val) \ { \ atomic_ ## op ## _long(p, val); \ } \ static __inline void \ -atomic_ ## op ## _acq_ptr(void *p, uintptr_t val) \ +atomic_ ## op ## _acq_ptr(volatile void *p, uintptr_t val) \ { \ atomic_ ## op ## _acq_long(p, val); \ } \ static __inline void \ -atomic_ ## op ## _rel_ptr(void *p, uintptr_t val) \ +atomic_ ## op ## _rel_ptr(volatile void *p, uintptr_t val) \ { \ atomic_ ## op ## _rel_long(p, val); \ } @@ -267,13 +267,13 @@ ATOMIC_POP(subtract) static __inline int -atomic_cmpset_ptr(void *p, void *old, void *val) +atomic_cmpset_ptr(volatile void *p, void *old, void *val) { return atomic_cmpset_long(p, (u_long)old, (u_long)val); } static __inline int -atomic_cmpset_acq_ptr(void *p, void *old, void *val) +atomic_cmpset_acq_ptr(volatile void *p, void *old, void *val) { int res; @@ -284,20 +284,20 @@ } static __inline int -atomic_cmpset_rel_ptr(void *p, void *old, void *val) +atomic_cmpset_rel_ptr(volatile void *p, void *old, void *val) { mips_read_membar(); return atomic_cmpset_long(p, (u_long)old, (u_long)val); } static __inline void * -atomic_load_acq_ptr(void *p) +atomic_load_acq_ptr(volatile void *p) { return (void *)atomic_load_acq_long(p); } static __inline void -atomic_store_rel_ptr(void *p, void *val) +atomic_store_rel_ptr(volatile void *p, void *val) { atomic_store_rel_long(p, (u_long)val); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303020116.h221GU93073831>