Lines Matching refs:ucl
192 load_uclist(uclist_t *ucl, const lwpstatus_t *psp)
194 struct ps_prochandle *P = ucl->uc_proc;
205 if (ucl->uc_nelems == ucl->uc_size) {
206 new_size = ucl->uc_size ? ucl->uc_size * 2 : 16;
207 new_addrs = realloc(ucl->uc_addrs,
211 ucl->uc_addrs = new_addrs;
212 ucl->uc_size = new_size;
230 ucl->uc_addrs[ucl->uc_nelems++] = addr;
242 for (i = 0; i < ucl->uc_nelems - 1; i++) {
243 if (ucl->uc_addrs[i] == addr)
265 init_uclist(uclist_t *ucl, struct ps_prochandle *P)
269 ucl->uc_proc = P;
270 ucl->uc_addrs = P->ucaddrs;
271 ucl->uc_nelems = P->ucnelems;
272 ucl->uc_size = P->ucnelems;
273 ucl->uc_cached = 1;
277 ucl->uc_proc = P;
278 ucl->uc_addrs = NULL;
279 ucl->uc_nelems = 0;
280 ucl->uc_size = 0;
282 (void) Plwp_iter(P, (proc_lwp_f *)load_uclist, ucl);
283 qsort(ucl->uc_addrs, ucl->uc_nelems, sizeof (uintptr_t), sort_uclist);
286 P->ucaddrs = ucl->uc_addrs;
287 P->ucnelems = ucl->uc_nelems;
288 ucl->uc_cached = 1;
290 ucl->uc_cached = 0;
295 free_uclist(uclist_t *ucl)
297 if (!ucl->uc_cached && ucl->uc_addrs != NULL)
298 free(ucl->uc_addrs);
302 find_uclink(uclist_t *ucl, uintptr_t addr)
304 if (ucl->uc_nelems != 0) {
305 return (bsearch(&addr, ucl->uc_addrs, ucl->uc_nelems,