Lines Matching refs:rsp
37 refstr_t *rsp; in refstr_alloc() local
38 size_t size = sizeof (rsp->rs_size) + sizeof (rsp->rs_refcnt) + in refstr_alloc()
42 rsp = kmem_alloc(size, KM_SLEEP); in refstr_alloc()
43 rsp->rs_size = (uint32_t)size; in refstr_alloc()
44 rsp->rs_refcnt = 1; in refstr_alloc()
45 (void) strcpy(rsp->rs_string, str); in refstr_alloc()
46 return (rsp); in refstr_alloc()
50 refstr_value(refstr_t *rsp) in refstr_value() argument
52 return (rsp != NULL ? (const char *)rsp->rs_string : NULL); in refstr_value()
56 refstr_hold(refstr_t *rsp) in refstr_hold() argument
58 atomic_inc_32(&rsp->rs_refcnt); in refstr_hold()
62 refstr_rele(refstr_t *rsp) in refstr_rele() argument
64 if (atomic_dec_32_nv(&rsp->rs_refcnt) == 0) in refstr_rele()
65 kmem_free(rsp, (size_t)rsp->rs_size); in refstr_rele()