Lines Matching refs:comm_str
12 DECLARE_RC_STRUCT(comm_str) { in DECLARE_RC_STRUCT() argument
19 struct comm_str **strs;
24 static void comm_strs__remove_if_last(struct comm_str *cs);
44 static refcount_t *comm_str__refcnt(struct comm_str *cs) in comm_str__refcnt()
49 static const char *comm_str__str(const struct comm_str *cs) in comm_str__str()
54 static struct comm_str *comm_str__get(struct comm_str *cs) in comm_str__get()
56 struct comm_str *result; in comm_str__get()
64 static void comm_str__put(struct comm_str *cs) in comm_str__put()
79 static struct comm_str *comm_str__new(const char *str) in comm_str__new()
81 struct comm_str *result = NULL; in comm_str__new()
82 RC_STRUCT(comm_str) *cs; in comm_str__new()
95 const struct comm_str *member = *(const struct comm_str * const *)_member; in comm_str__search()
100 static void comm_strs__remove_if_last(struct comm_str *cs) in comm_strs__remove_if_last()
110 struct comm_str **entry; in comm_strs__remove_if_last()
113 sizeof(struct comm_str *), comm_str__search); in comm_strs__remove_if_last()
122 static struct comm_str *__comm_strs__find(struct comm_strs *comm_strs, const char *str) in __comm_strs__find()
125 struct comm_str **result; in __comm_strs__find()
127 result = bsearch(str, comm_strs->strs, comm_strs->num_strs, sizeof(struct comm_str *), in __comm_strs__find()
136 static struct comm_str *comm_strs__findnew(const char *str) in comm_strs__findnew()
139 struct comm_str *result; in comm_strs__findnew()
154 struct comm_str **tmp; in comm_strs__findnew()
183 (comm_strs->num_strs - insert) * sizeof(struct comm_str *)); in comm_strs__findnew()
202 comm->comm_str = comm_strs__findnew(str); in comm__new()
203 if (!comm->comm_str) { in comm__new()
213 struct comm_str *new, *old = comm->comm_str; in comm__override()
220 comm->comm_str = new; in comm__override()
230 comm_str__put(comm->comm_str); in comm__free()
236 return comm_str__str(comm->comm_str); in comm__str()