Print this page
5042 stop using deprecated atomic functions
@@ -2870,11 +2870,11 @@
struct fem_head *head;
head = kmem_alloc(sizeof (*head), KM_SLEEP);
mutex_init(&head->femh_lock, NULL, MUTEX_DEFAULT, NULL);
head->femh_list = NULL;
- if (casptr(hp, NULL, head) != NULL) {
+ if (atomic_cas_ptr(hp, NULL, head) != NULL) {
kmem_free(head, sizeof (*head));
head = *hp;
}
return (head);
}
@@ -3363,11 +3363,11 @@
fem_unlock(v->v_femhead);
return;
}
fem_unlock(v->v_femhead);
}
- } while (casptr(&v->v_op, r, newops) != r);
+ } while (atomic_cas_ptr(&v->v_op, r, newops) != r);
}
vnodeops_t *
fem_getvnops(vnode_t *v)
{
@@ -3506,11 +3506,11 @@
fem_unlock(v->vfs_femhead);
return;
}
fem_unlock(v->vfs_femhead);
}
- } while (casptr(&v->vfs_op, r, newops) != r);
+ } while (atomic_cas_ptr(&v->vfs_op, r, newops) != r);
}
vfsops_t *
fsem_getvfsops(vfs_t *v)
{