Lines Matching refs:cs
15 static void comm_str__get(struct comm_str *cs) in comm_str__get() argument
17 cs->ref++; in comm_str__get()
20 static void comm_str__put(struct comm_str *cs) in comm_str__put() argument
22 if (!--cs->ref) { in comm_str__put()
23 rb_erase(&cs->rb_node, &comm_str_root); in comm_str__put()
24 zfree(&cs->str); in comm_str__put()
25 free(cs); in comm_str__put()
31 struct comm_str *cs; in comm_str__alloc() local
33 cs = zalloc(sizeof(*cs)); in comm_str__alloc()
34 if (!cs) in comm_str__alloc()
37 cs->str = strdup(str); in comm_str__alloc()
38 if (!cs->str) { in comm_str__alloc()
39 free(cs); in comm_str__alloc()
43 return cs; in comm_str__alloc()