From owner-svn-src-head@FreeBSD.ORG Thu May 20 06:18:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 836061065673; Thu, 20 May 2010 06:18:03 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72C948FC14; Thu, 20 May 2010 06:18:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4K6I3uQ010716; Thu, 20 May 2010 06:18:03 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4K6I3G3010713; Thu, 20 May 2010 06:18:03 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <201005200618.o4K6I3G3010713@svn.freebsd.org> From: Poul-Henning Kamp Date: Thu, 20 May 2010 06:18:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208332 - in head/sys: amd64/include i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 May 2010 06:18:03 -0000 Author: phk Date: Thu May 20 06:18:03 2010 New Revision: 208332 URL: http://svn.freebsd.org/changeset/base/208332 Log: Rename an argument from "exp" to "expect" since the former makes FlexeLint uneasy, in case anybody think it might be exp(3) in libm. This also makes it consistent with other archs. Modified: head/sys/amd64/include/atomic.h head/sys/i386/include/atomic.h Modified: head/sys/amd64/include/atomic.h ============================================================================== --- head/sys/amd64/include/atomic.h Thu May 20 06:16:13 2010 (r208331) +++ head/sys/amd64/include/atomic.h Thu May 20 06:18:03 2010 (r208332) @@ -76,8 +76,8 @@ void atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v); \ void atomic_##NAME##_barr_##TYPE(volatile u_##TYPE *p, u_##TYPE v) -int atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src); -int atomic_cmpset_long(volatile u_long *dst, u_long exp, u_long src); +int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src); +int atomic_cmpset_long(volatile u_long *dst, u_long expect, u_long src); u_int atomic_fetchadd_int(volatile u_int *p, u_int v); u_long atomic_fetchadd_long(volatile u_long *p, u_long v); @@ -124,13 +124,13 @@ struct __hack /* * Atomic compare and set, used by the mutex functions * - * if (*dst == exp) *dst = src (all 32 bit words) + * if (*dst == expect) *dst = src (all 32 bit words) * * Returns 0 on failure, non-zero on success */ static __inline int -atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src) +atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { u_char res; @@ -143,7 +143,7 @@ atomic_cmpset_int(volatile u_int *dst, u : "=a" (res), /* 0 */ "=m" (*dst) /* 1 */ : "r" (src), /* 2 */ - "a" (exp), /* 3 */ + "a" (expect), /* 3 */ "m" (*dst) /* 4 */ : "memory"); @@ -151,7 +151,7 @@ atomic_cmpset_int(volatile u_int *dst, u } static __inline int -atomic_cmpset_long(volatile u_long *dst, u_long exp, u_long src) +atomic_cmpset_long(volatile u_long *dst, u_long expect, u_long src) { u_char res; @@ -164,7 +164,7 @@ atomic_cmpset_long(volatile u_long *dst, : "=a" (res), /* 0 */ "=m" (*dst) /* 1 */ : "r" (src), /* 2 */ - "a" (exp), /* 3 */ + "a" (expect), /* 3 */ "m" (*dst) /* 4 */ : "memory"); Modified: head/sys/i386/include/atomic.h ============================================================================== --- head/sys/i386/include/atomic.h Thu May 20 06:16:13 2010 (r208331) +++ head/sys/i386/include/atomic.h Thu May 20 06:18:03 2010 (r208332) @@ -76,7 +76,7 @@ void atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v); \ void atomic_##NAME##_barr_##TYPE(volatile u_##TYPE *p, u_##TYPE v) -int atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src); +int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src); u_int atomic_fetchadd_int(volatile u_int *p, u_int v); #define ATOMIC_STORE_LOAD(TYPE, LOP, SOP) \ @@ -122,7 +122,7 @@ struct __hack /* * Atomic compare and set, used by the mutex functions * - * if (*dst == exp) *dst = src (all 32 bit words) + * if (*dst == expect) *dst = src (all 32 bit words) * * Returns 0 on failure, non-zero on success */ @@ -130,7 +130,7 @@ struct __hack #ifdef CPU_DISABLE_CMPXCHG static __inline int -atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src) +atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { u_char res; @@ -147,7 +147,7 @@ atomic_cmpset_int(volatile u_int *dst, u : "=q" (res), /* 0 */ "=m" (*dst) /* 1 */ : "r" (src), /* 2 */ - "r" (exp), /* 3 */ + "r" (expect), /* 3 */ "m" (*dst) /* 4 */ : "memory"); @@ -157,7 +157,7 @@ atomic_cmpset_int(volatile u_int *dst, u #else /* !CPU_DISABLE_CMPXCHG */ static __inline int -atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src) +atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src) { u_char res; @@ -170,7 +170,7 @@ atomic_cmpset_int(volatile u_int *dst, u : "=a" (res), /* 0 */ "=m" (*dst) /* 1 */ : "r" (src), /* 2 */ - "a" (exp), /* 3 */ + "a" (expect), /* 3 */ "m" (*dst) /* 4 */ : "memory"); @@ -292,10 +292,10 @@ ATOMIC_STORE_LOAD(long, "cmpxchgl %0,%1" #ifndef WANT_FUNCTIONS static __inline int -atomic_cmpset_long(volatile u_long *dst, u_long exp, u_long src) +atomic_cmpset_long(volatile u_long *dst, u_long expect, u_long src) { - return (atomic_cmpset_int((volatile u_int *)dst, (u_int)exp, + return (atomic_cmpset_int((volatile u_int *)dst, (u_int)expect, (u_int)src)); }