aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_atomic64.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2021-12-28 17:41:08 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2021-12-28 17:41:08 +0000
commit2cee5861898daea5bbc2427d0e67d15559564683 (patch)
treed34bbdd6fd942df6cb0a7230686a7a558903a1d6 /sys/kern/subr_atomic64.c
parent4287aa56197fc2e37cad07c23b52f9ed4f1a7fd0 (diff)
downloadsrc-2cee5861898daea5bbc2427d0e67d15559564683.tar.gz
src-2cee5861898daea5bbc2427d0e67d15559564683.zip
Diffstat (limited to 'sys/kern/subr_atomic64.c')
-rw-r--r--sys/kern/subr_atomic64.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/kern/subr_atomic64.c b/sys/kern/subr_atomic64.c
index 5dffb161e8f2..66d2d4924d35 100644
--- a/sys/kern/subr_atomic64.c
+++ b/sys/kern/subr_atomic64.c
@@ -80,8 +80,8 @@ static struct mtx a64_mtx_pool[A64_POOL_SIZE];
#define ATOMIC64_EMU_UN(op, rt, block, ret) \
rt \
- atomic_##op##_64(volatile u_int64_t *p) { \
- u_int64_t tmp __unused; \
+ atomic_##op##_64(volatile uint64_t *p) { \
+ uint64_t tmp __unused; \
LOCK_A64(); \
block; \
UNLOCK_A64(); \
@@ -89,8 +89,8 @@ static struct mtx a64_mtx_pool[A64_POOL_SIZE];
#define ATOMIC64_EMU_BIN(op, rt, block, ret) \
rt \
- atomic_##op##_64(volatile u_int64_t *p, u_int64_t v) { \
- u_int64_t tmp __unused; \
+ atomic_##op##_64(volatile uint64_t *p, uint64_t v) { \
+ uint64_t tmp __unused; \
LOCK_A64(); \
block; \
UNLOCK_A64(); \
@@ -98,16 +98,16 @@ static struct mtx a64_mtx_pool[A64_POOL_SIZE];
ATOMIC64_EMU_BIN(add, void, (*p = *p + v), return);
ATOMIC64_EMU_BIN(clear, void, *p &= ~v, return);
-ATOMIC64_EMU_BIN(fetchadd, u_int64_t, (*p = *p + v, v = *p - v), return (v));
-ATOMIC64_EMU_UN(load, u_int64_t, (tmp = *p), return (tmp));
+ATOMIC64_EMU_BIN(fetchadd, uint64_t, (*p = *p + v, v = *p - v), return (v));
+ATOMIC64_EMU_UN(load, uint64_t, (tmp = *p), return (tmp));
ATOMIC64_EMU_BIN(set, void, *p |= v, return);
ATOMIC64_EMU_BIN(subtract, void, (*p = *p - v), return);
ATOMIC64_EMU_BIN(store, void, *p = v, return);
-ATOMIC64_EMU_BIN(swap, u_int64_t, tmp = *p; *p = v; v = tmp, return(v));
+ATOMIC64_EMU_BIN(swap, uint64_t, tmp = *p; *p = v; v = tmp, return(v));
-int atomic_cmpset_64(volatile u_int64_t *p, u_int64_t old, u_int64_t new)
+int atomic_cmpset_64(volatile uint64_t *p, uint64_t old, uint64_t new)
{
- u_int64_t tmp;
+ uint64_t tmp;
LOCK_A64();
tmp = *p;
@@ -118,9 +118,9 @@ int atomic_cmpset_64(volatile u_int64_t *p, u_int64_t old, u_int64_t new)
return (tmp == old);
}
-int atomic_fcmpset_64(volatile u_int64_t *p, u_int64_t *old, u_int64_t new)
+int atomic_fcmpset_64(volatile uint64_t *p, uint64_t *old, uint64_t new)
{
- u_int64_t tmp, tmp_old;
+ uint64_t tmp, tmp_old;
LOCK_A64();
tmp = *p;