summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/atomic.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2010-05-20 06:18:03 +0000
committerphk <phk@FreeBSD.org>2010-05-20 06:18:03 +0000
commit3cad03a86c7b5013695166f282aeadccdd37d2de (patch)
tree993f6999d7e74797b56b3d9d075e8fb5f2a2e031 /sys/amd64/include/atomic.h
parent3c3fa2f5b0c7640373fcbcc3f667bf7794e8e609 (diff)
downloadFreeBSD-src-3cad03a86c7b5013695166f282aeadccdd37d2de.zip
FreeBSD-src-3cad03a86c7b5013695166f282aeadccdd37d2de.tar.gz
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.
Diffstat (limited to 'sys/amd64/include/atomic.h')
-rw-r--r--sys/amd64/include/atomic.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h
index a2bd930..bcf61f9 100644
--- a/sys/amd64/include/atomic.h
+++ b/sys/amd64/include/atomic.h
@@ -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_int exp, u_int src)
: "=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_int exp, u_int src)
}
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, u_long exp, u_long src)
: "=a" (res), /* 0 */
"=m" (*dst) /* 1 */
: "r" (src), /* 2 */
- "a" (exp), /* 3 */
+ "a" (expect), /* 3 */
"m" (*dst) /* 4 */
: "memory");
OpenPOWER on IntegriCloud