Lines Matching refs:comm_str
10 DECLARE_RC_STRUCT(comm_str) { in DECLARE_RC_STRUCT() argument
17 struct comm_str **strs;
22 static void comm_strs__remove_if_last(struct comm_str *cs);
41 static refcount_t *comm_str__refcnt(struct comm_str *cs) in comm_str__refcnt()
46 static const char *comm_str__str(const struct comm_str *cs) in comm_str__str()
51 static struct comm_str *comm_str__get(struct comm_str *cs) in comm_str__get()
53 struct comm_str *result; in comm_str__get()
61 static void comm_str__put(struct comm_str *cs) in comm_str__put()
76 static struct comm_str *comm_str__new(const char *str) in comm_str__new()
78 struct comm_str *result = NULL; in comm_str__new()
79 RC_STRUCT(comm_str) *cs; in comm_str__new()
92 const struct comm_str *member = *(const struct comm_str * const *)_member; in comm_str__search()
97 static void comm_strs__remove_if_last(struct comm_str *cs) in comm_strs__remove_if_last()
107 struct comm_str **entry; in comm_strs__remove_if_last()
110 sizeof(struct comm_str *), comm_str__search); in comm_strs__remove_if_last()
119 static struct comm_str *__comm_strs__find(struct comm_strs *comm_strs, const char *str) in __comm_strs__find()
121 struct comm_str **result; in __comm_strs__find()
123 result = bsearch(str, comm_strs->strs, comm_strs->num_strs, sizeof(struct comm_str *), in __comm_strs__find()
132 static struct comm_str *comm_strs__findnew(const char *str) in comm_strs__findnew()
135 struct comm_str *result; in comm_strs__findnew()
150 struct comm_str **tmp; in comm_strs__findnew()
179 (comm_strs->num_strs - insert) * sizeof(struct comm_str *)); in comm_strs__findnew()
198 comm->comm_str = comm_strs__findnew(str); in comm__new()
199 if (!comm->comm_str) { in comm__new()
209 struct comm_str *new, *old = comm->comm_str; in comm__override()
216 comm->comm_str = new; in comm__override()
226 comm_str__put(comm->comm_str); in comm__free()
232 return comm_str__str(comm->comm_str); in comm__str()