From owner-p4-projects@FreeBSD.ORG Wed Jan 30 23:59:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AE73816A52A; Wed, 30 Jan 2008 23:59:38 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2003616A41B for ; Wed, 30 Jan 2008 23:59:38 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 12B8513C457 for ; Wed, 30 Jan 2008 23:59:38 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0UNxbZM023455 for ; Wed, 30 Jan 2008 23:59:37 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0UNxbFC023449 for perforce@freebsd.org; Wed, 30 Jan 2008 23:59:37 GMT (envelope-from cognet@freebsd.org) Date: Wed, 30 Jan 2008 23:59:37 GMT Message-Id: <200801302359.m0UNxbFC023449@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 134509 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2008 23:59:39 -0000 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_ */