summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/vm
diff options
context:
space:
mode:
authorJosef 'Jeff' Sipek <josef.sipek@nexenta.com>2014-08-08 10:27:20 -0400
committerRobert Mustacchi <rm@joyent.com>2014-08-12 09:27:14 -0700
commit75d94465dbafa487b716482dc36d5150a4ec9853 (patch)
treeecebaff9a32b7a5e5c3f4bba78393ceb328aab73 /usr/src/uts/common/vm
parent588575c88d134c8f25f645542bcf36d61ac43a82 (diff)
downloadillumos-joyent-75d94465dbafa487b716482dc36d5150a4ec9853.tar.gz
5042 stop using deprecated atomic functions
Reviewed by: Dan McDonald <danmcd@omniti.com> Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/uts/common/vm')
-rw-r--r--usr/src/uts/common/vm/seg_kp.c2
-rw-r--r--usr/src/uts/common/vm/seg_vn.c13
2 files changed, 8 insertions, 7 deletions
diff --git a/usr/src/uts/common/vm/seg_kp.c b/usr/src/uts/common/vm/seg_kp.c
index ad5d88b0d2..c810adf41c 100644
--- a/usr/src/uts/common/vm/seg_kp.c
+++ b/usr/src/uts/common/vm/seg_kp.c
@@ -840,7 +840,7 @@ segkp_map_red(void)
atomic_add_32(&red_nmapped, 1);
while (fp - (uintptr_t)curthread->t_stkbase < red_closest) {
- (void) cas32(&red_closest, red_closest,
+ (void) atomic_cas_32(&red_closest, red_closest,
(uint32_t)(fp - (uintptr_t)curthread->t_stkbase));
}
return (1);
diff --git a/usr/src/uts/common/vm/seg_vn.c b/usr/src/uts/common/vm/seg_vn.c
index 31c293d416..2803f071f7 100644
--- a/usr/src/uts/common/vm/seg_vn.c
+++ b/usr/src/uts/common/vm/seg_vn.c
@@ -9711,17 +9711,18 @@ again:
* replication and T1 new home is different from lgrp used for text
* replication. When this happens asyncronous segvn thread rechecks if
* segments should change lgrps used for text replication. If we fail
- * to set p_tr_lgrpid with cas32 then set it to NLGRPS_MAX without cas
- * if it's not already NLGRPS_MAX and not equal lgrp_id we want to
- * use. We don't need to use cas in this case because another thread
- * that races in between our non atomic check and set may only change
- * p_tr_lgrpid to NLGRPS_MAX at this point.
+ * to set p_tr_lgrpid with atomic_cas_32 then set it to NLGRPS_MAX
+ * without cas if it's not already NLGRPS_MAX and not equal lgrp_id
+ * we want to use. We don't need to use cas in this case because
+ * another thread that races in between our non atomic check and set
+ * may only change p_tr_lgrpid to NLGRPS_MAX at this point.
*/
ASSERT(lgrp_id != LGRP_NONE && lgrp_id < NLGRPS_MAX);
olid = p->p_tr_lgrpid;
if (lgrp_id != olid && olid != NLGRPS_MAX) {
lgrp_id_t nlid = (olid == LGRP_NONE) ? lgrp_id : NLGRPS_MAX;
- if (cas32((uint32_t *)&p->p_tr_lgrpid, olid, nlid) != olid) {
+ if (atomic_cas_32((uint32_t *)&p->p_tr_lgrpid, olid, nlid) !=
+ olid) {
olid = p->p_tr_lgrpid;
ASSERT(olid != LGRP_NONE);
if (olid != lgrp_id && olid != NLGRPS_MAX) {