Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2008 23:59:37 GMT
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 134509 for review
Message-ID:  <200801302359.m0UNxbFC023449@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=134509

Change 134509 by cognet@hulglah on 2008/01/30 23:59:18

	Use 32bits longs for mips32, and 64bits pointers for mips64.
	XXX: 64bits atomic operations aren't implemented.

Affected files ...

.. //depot/projects/mips2-jnpr/src/sys/mips/include/atomic.h#4 edit

Differences ...

==== //depot/projects/mips2-jnpr/src/sys/mips/include/atomic.h#4 (text+ko) ====

@@ -345,6 +345,7 @@
 #define	atomic_readandset_int	atomic_readandset_32
 #define	atomic_fetchadd_int	atomic_fetchadd_32
 
+#ifdef __mips64
 /* Operations on longs. */
 #define	atomic_set_long		atomic_set_64
 #define	atomic_set_acq_long	atomic_set_acq_64
@@ -366,6 +367,48 @@
 #define	atomic_readandclear_long	atomic_readandclear_64
 
 /* Operations on pointers. */
+#define	atomic_set_ptr		atomic_set_64
+#define	atomic_set_acq_ptr	atomic_set_acq_64
+#define	atomic_set_rel_ptr	atomic_set_rel_64
+#define	atomic_clear_ptr	atomic_clear_64
+#define	atomic_clear_acq_ptr	atomic_clear_acq_64
+#define	atomic_clear_rel_ptr	atomic_clear_rel_64
+#define	atomic_add_ptr		atomic_add_64
+#define	atomic_add_acq_ptr	atomic_add_acq_64
+#define	atomic_add_rel_ptr	atomic_add_rel_64
+#define	atomic_subtract_ptr	atomic_subtract_64
+#define	atomic_subtract_acq_ptr	atomic_subtract_acq_64
+#define	atomic_subtract_rel_ptr	atomic_subtract_rel_64
+#define	atomic_cmpset_ptr	atomic_cmpset_64
+#define	atomic_cmpset_acq_ptr	atomic_cmpset_acq_64
+#define	atomic_cmpset_rel_ptr	atomic_cmpset_rel_64
+#define	atomic_load_acq_ptr	atomic_load_acq_64
+#define	atomic_store_rel_ptr	atomic_store_rel_64
+#define	atomic_readandclear_ptr	atomic_readandclear_64
+
+#else /* __mips64 */
+
+/* Operations on longs. */
+#define	atomic_set_long		atomic_set_32
+#define	atomic_set_acq_long	atomic_set_acq_32
+#define	atomic_set_rel_long	atomic_set_rel_32
+#define	atomic_clear_long	atomic_clear_32
+#define	atomic_clear_acq_long	atomic_clear_acq_32
+#define	atomic_clear_rel_long	atomic_clear_rel_32
+#define	atomic_add_long		atomic_add_32
+#define	atomic_add_acq_long	atomic_add_acq_32
+#define	atomic_add_rel_long	atomic_add_rel_32
+#define	atomic_subtract_long	atomic_subtract_32
+#define	atomic_subtract_acq_long	atomic_subtract_acq_32
+#define	atomic_subtract_rel_long	atomic_subtract_rel_32
+#define	atomic_cmpset_long	atomic_cmpset_32
+#define	atomic_cmpset_acq_long	atomic_cmpset_acq_32
+#define	atomic_cmpset_rel_long	atomic_cmpset_rel_32
+#define	atomic_load_acq_long	atomic_load_acq_32
+#define	atomic_store_rel_long	atomic_store_rel_32
+#define	atomic_readandclear_long	atomic_readandclear_32
+
+/* Operations on pointers. */
 #define	atomic_set_ptr		atomic_set_32
 #define	atomic_set_acq_ptr	atomic_set_acq_32
 #define	atomic_set_rel_ptr	atomic_set_rel_32
@@ -384,5 +427,6 @@
 #define	atomic_load_acq_ptr	atomic_load_acq_32
 #define	atomic_store_rel_ptr	atomic_store_rel_32
 #define	atomic_readandclear_ptr	atomic_readandclear_32
+#endif /* __mips64 */
 
 #endif /* ! _MACHINE_ATOMIC_H_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801302359.m0UNxbFC023449>