Print this page
5042 stop using deprecated atomic functions
*** 2870,2880 ****
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) {
kmem_free(head, sizeof (*head));
head = *hp;
}
return (head);
}
--- 2870,2880 ----
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 (atomic_cas_ptr(hp, NULL, head) != NULL) {
kmem_free(head, sizeof (*head));
head = *hp;
}
return (head);
}
*** 3363,3373 ****
fem_unlock(v->v_femhead);
return;
}
fem_unlock(v->v_femhead);
}
! } while (casptr(&v->v_op, r, newops) != r);
}
vnodeops_t *
fem_getvnops(vnode_t *v)
{
--- 3363,3373 ----
fem_unlock(v->v_femhead);
return;
}
fem_unlock(v->v_femhead);
}
! } while (atomic_cas_ptr(&v->v_op, r, newops) != r);
}
vnodeops_t *
fem_getvnops(vnode_t *v)
{
*** 3506,3516 ****
fem_unlock(v->vfs_femhead);
return;
}
fem_unlock(v->vfs_femhead);
}
! } while (casptr(&v->vfs_op, r, newops) != r);
}
vfsops_t *
fsem_getvfsops(vfs_t *v)
{
--- 3506,3516 ----
fem_unlock(v->vfs_femhead);
return;
}
fem_unlock(v->vfs_femhead);
}
! } while (atomic_cas_ptr(&v->vfs_op, r, newops) != r);
}
vfsops_t *
fsem_getvfsops(vfs_t *v)
{