aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2000-10-20 19:54:47 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2000-10-20 19:54:47 +0000
commit8cc99fae9ad71f9bff2cdae68b7864e624c53aee (patch)
tree8c8a101281859eb490e401bb34ef3a075cdf8c8e
parentbb352e20a25aac18a87b8d9d1ff5b8a803354898 (diff)
Notes
-rw-r--r--sys/alpha/include/mutex.h8
-rw-r--r--sys/powerpc/include/mutex.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/alpha/include/mutex.h b/sys/alpha/include/mutex.h
index 5ccc28d78753..6c376f0d81a1 100644
--- a/sys/alpha/include/mutex.h
+++ b/sys/alpha/include/mutex.h
@@ -72,11 +72,11 @@ extern char STR_SIEN[];
#define _getlock_spin_block(mp, tid, type) do { \
u_int _ipl = alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH); \
- if (atomic_cmpset_64(&(mp)->mtx_lock, MTX_UNOWNED, (tid)) == 0) \
+ if (!_obtain_lock(mp, tid)) \
mtx_enter_hard(mp, (type) & MTX_HARDOPTS, _ipl); \
else { \
alpha_mb(); \
- (mp)->mtx_saveipl = _ipl; \
+ (mp)->mtx_saveintr = _ipl; \
} \
} while (0)
@@ -97,13 +97,13 @@ extern char STR_SIEN[];
stq_c a0, lck+MTX_LOCK; \
beq a0, 1b; \
mb; \
- stl v0, lck+MTX_SAVEIPL
+ stl v0, lck+MTX_SAVEINTR
#define MTX_EXIT(lck) \
mb; \
ldiq a0, MTX_UNOWNED; \
stq a0, lck+MTX_LOCK; \
- ldl a0, lck+MTX_SAVEIPL; \
+ ldl a0, lck+MTX_SAVEINTR; \
call_pal PAL_OSF1_swpipl
#endif /* !LOCORE */
diff --git a/sys/powerpc/include/mutex.h b/sys/powerpc/include/mutex.h
index 5ccc28d78753..6c376f0d81a1 100644
--- a/sys/powerpc/include/mutex.h
+++ b/sys/powerpc/include/mutex.h
@@ -72,11 +72,11 @@ extern char STR_SIEN[];
#define _getlock_spin_block(mp, tid, type) do { \
u_int _ipl = alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH); \
- if (atomic_cmpset_64(&(mp)->mtx_lock, MTX_UNOWNED, (tid)) == 0) \
+ if (!_obtain_lock(mp, tid)) \
mtx_enter_hard(mp, (type) & MTX_HARDOPTS, _ipl); \
else { \
alpha_mb(); \
- (mp)->mtx_saveipl = _ipl; \
+ (mp)->mtx_saveintr = _ipl; \
} \
} while (0)
@@ -97,13 +97,13 @@ extern char STR_SIEN[];
stq_c a0, lck+MTX_LOCK; \
beq a0, 1b; \
mb; \
- stl v0, lck+MTX_SAVEIPL
+ stl v0, lck+MTX_SAVEINTR
#define MTX_EXIT(lck) \
mb; \
ldiq a0, MTX_UNOWNED; \
stq a0, lck+MTX_LOCK; \
- ldl a0, lck+MTX_SAVEIPL; \
+ ldl a0, lck+MTX_SAVEINTR; \
call_pal PAL_OSF1_swpipl
#endif /* !LOCORE */