Print this page
5042 stop using deprecated atomic functions
*** 22,33 ****
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
- #pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Multidata, as described in the following papers:
*
* Adi Masputra,
* Multidata V.2: VA-Disjoint Packet Extents Framework Interface
--- 22,31 ----
*** 1292,1302 ****
tbl = kmem_cache_alloc(pattbl_cache, kmflags);
if (tbl == NULL)
return (NULL);
/* if someone got there first, use his table instead */
! if ((o_tbl = casptr(tbl_p, NULL, tbl)) != NULL) {
kmem_cache_free(pattbl_cache, tbl);
tbl = o_tbl;
}
}
--- 1290,1300 ----
tbl = kmem_cache_alloc(pattbl_cache, kmflags);
if (tbl == NULL)
return (NULL);
/* if someone got there first, use his table instead */
! if ((o_tbl = atomic_cas_ptr(tbl_p, NULL, tbl)) != NULL) {
kmem_cache_free(pattbl_cache, tbl);
tbl = o_tbl;
}
}