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