Lines Matching refs:lcol
80 lcollection_t *lcol; in lcollection_insert_update() local
87 lcol = lcollection_find(colidp); in lcollection_insert_update()
92 if (lcol == NULL) { in lcollection_insert_update()
101 lcol = malloc(sizeof (*lcol)); in lcollection_insert_update()
102 if (lcol == NULL) { in lcollection_insert_update()
108 (void) bzero(lcol, sizeof (*lcol)); in lcollection_insert_update()
110 lcol->lcol_id = *colidp; in lcollection_insert_update()
112 lcol->lcol_prev = NULL; in lcollection_insert_update()
113 lcol->lcol_next = lcollection_head; in lcollection_insert_update()
114 lcol->lcol_stat.lcols_min_rss = (uint64_t)-1; in lcollection_insert_update()
116 lcollection_head->lcol_prev = lcol; in lcollection_insert_update()
117 lcollection_head = lcol; in lcollection_insert_update()
123 (void) strlcpy(lcol->lcol_name, name, sizeof (lcol->lcol_name)); in lcollection_insert_update()
128 if (rss_cap != lcol->lcol_rss_cap) { in lcollection_insert_update()
130 lcol->lcol_rss_cap = rss_cap; in lcollection_insert_update()
131 if (lcol->lcol_rss_cap == 0) in lcollection_insert_update()
136 lcol->lcol_mark++; in lcollection_insert_update()
138 return (lcol); in lcollection_insert_update()
168 lcollection_t *lcol; in list_walk_collection() local
171 lcol = lcollection_head; in list_walk_collection()
172 while (lcol != NULL) { in list_walk_collection()
173 next = lcol->lcol_next; in list_walk_collection()
174 if (cb(lcol, arg) != 0) in list_walk_collection()
176 lcol = next; in list_walk_collection()
185 lcollection_member(lcollection_t *lcol, lprocess_t *lpc) in lcollection_member() argument
187 lprocess_t *cur = lcol->lcol_lprocess; in lcollection_member()
198 lcollection_find_cb(lcollection_t *lcol, void *arg) in lcollection_find_cb() argument
202 if (lcol->lcol_id.rcid_type == colidp->rcid_type && in lcollection_find_cb()
203 lcol->lcol_id.rcid_val == colidp->rcid_val) { in lcollection_find_cb()
204 ((lcollection_find_arg_t *)arg)->lfa_found = lcol; in lcollection_find_cb()
227 lcollection_free(lcollection_t *lcol) in lcollection_free() argument
232 lpc = lcol->lcol_lprocess; in lcollection_free()
235 if (lpc->lpc_collection == lcol) in lcollection_free()
243 if (lcol->lcol_prev != NULL) in lcollection_free()
244 lcol->lcol_prev->lcol_next = lcol->lcol_next; in lcollection_free()
245 if (lcol->lcol_next != NULL) in lcollection_free()
246 lcol->lcol_next->lcol_prev = lcol->lcol_prev; in lcollection_free()
247 if (lcollection_head == lcol) in lcollection_free()
248 lcollection_head = lcol->lcol_next; in lcollection_free()
249 lcol->lcol_next = lcol->lcol_prev = NULL; in lcollection_free()
251 free(lcol); in lcollection_free()