Lines Matching refs:ucl
170 load_uclist(uclist_t *ucl, const lwpstatus_t *psp)
172 struct ps_prochandle *P = ucl->uc_proc;
183 if (ucl->uc_nelems == ucl->uc_size) {
184 new_size = ucl->uc_size ? ucl->uc_size * 2 : 16;
185 new_addrs = realloc(ucl->uc_addrs,
189 ucl->uc_addrs = new_addrs;
190 ucl->uc_size = new_size;
208 ucl->uc_addrs[ucl->uc_nelems++] = addr;
220 for (i = 0; i < ucl->uc_nelems - 1; i++) {
221 if (ucl->uc_addrs[i] == addr)
243 init_uclist(uclist_t *ucl, struct ps_prochandle *P)
247 ucl->uc_proc = P;
248 ucl->uc_addrs = P->ucaddrs;
249 ucl->uc_nelems = P->ucnelems;
250 ucl->uc_size = P->ucnelems;
251 ucl->uc_cached = 1;
255 ucl->uc_proc = P;
256 ucl->uc_addrs = NULL;
257 ucl->uc_nelems = 0;
258 ucl->uc_size = 0;
260 (void) Plwp_iter(P, (proc_lwp_f *)load_uclist, ucl);
261 qsort(ucl->uc_addrs, ucl->uc_nelems, sizeof (uintptr_t), sort_uclist);
264 P->ucaddrs = ucl->uc_addrs;
265 P->ucnelems = ucl->uc_nelems;
266 ucl->uc_cached = 1;
268 ucl->uc_cached = 0;
273 free_uclist(uclist_t *ucl)
275 if (!ucl->uc_cached && ucl->uc_addrs != NULL)
276 free(ucl->uc_addrs);
280 find_uclink(uclist_t *ucl, uintptr_t addr)
282 if (ucl->uc_nelems != 0) {
283 return (bsearch(&addr, ucl->uc_addrs, ucl->uc_nelems,