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