Lines Matching defs:tl
144 struct target_list *tl;
162 if (!(tl = calloc(1, sizeof (*tl)))) {
166 tl->DAs = NULL;
168 if (!(tl->scopes = calloc(scope_cnt + 1, sizeof (*(tl->scopes))))) {
170 free(tl);
173 tl->uc_scopes = NULL;
174 tl->state = tl->scopes;
175 if (!(tl->all_scopes = strdup(scopes))) {
177 free(tl->scopes); free(tl);
181 if (!(tl->mc_scopes = strdup(scopes))) {
183 free(tl->scopes); free(tl->all_scopes); free(tl);
189 *handle = tl;
202 free(tl->scopes);
203 free(tl->all_scopes);
204 free(tl->mc_scopes);
205 free(tl);
212 free(tl->scopes);
213 free(tl->all_scopes);
214 free(tl->mc_scopes);
215 free(tl);
228 tl, &collator, &numResults);
232 tl, &collator, &numResults);
239 * tl->DAs now points to a list of DAs sorted by the number of
243 for (te = tl->DAs; te; te = te->next)
244 add2scopes_list(te, tl);
246 *handle = tl;
251 struct target_list *tl = (struct target_list *)h;
252 return (tl->uc_scopes);
256 struct target_list *tl = (struct target_list *)h;
257 return (tl->mc_scopes);
262 struct target_list *tl = (struct target_list *)h;
264 if (!(*tl->state))
267 for (; *tl->state; tl->state++) {
268 if (!(*tl->state)->da->used && !(*tl->state)->da->failed)
269 return (*tl->state++);
270 if ((*tl->state)->da->failed) {
272 if (p = slp_next_failover(*tl->state)) {
273 tl->state++;
345 struct target_list *tl = (struct target_list *)h;
348 for (das = tl->DAs; das; das = dap) {
355 for (i = 0; tl->scopes[i]; i++) {
357 for (sts = tl->scopes[i]; sts; sts = stp) {
364 free(tl->scopes);
367 if (tl->uc_scopes)
368 free(tl->uc_scopes);
369 if (tl->mc_scopes)
370 free(tl->mc_scopes);
371 free(tl->all_scopes);
374 free(tl);
377 static void add2scopes_list(struct da_node *te, struct target_list *tl) {
378 struct scope_targets **scopes = tl->scopes;
383 * for each scope in tl->uc_scopes:
387 for (s = tl->uc_scopes; s; s = p) {
476 struct target_list *tl = (struct target_list *)cookie;
528 for (s = tl->all_scopes; s; s = p) {
534 slp_add2list(s, &(tl->uc_scopes), SLP_TRUE);
535 slp_list_subtract(s, &(tl->mc_scopes));
542 add_da_entry(&(tl->DAs), sin, sscopes, proximity, coverage);