Lines Matching defs:ghp
128 hdl_add(Grp_hdl *ghp, Rt_map *lmp, uint_t dflags, int *alep)
138 for (ALIST_TRAVERSE(ghp->gh_depends, idx, gdp)) {
157 if (aplist_append(&GROUPS(lmp), ghp, AL_CNT_GROUPS) == NULL)
163 if ((gdp = alist_append(&ghp->gh_depends, &gd,
173 DBG_CALL(Dbg_file_hdl_action(ghp, lmp, DBG_DEP_ADD,
176 DBG_CALL(Dbg_file_hdl_action(ghp, lmp, DBG_DEP_UPDATE,
203 Grp_hdl *ghp = NULL, *aghp;
227 ghp = aghp;
232 if (ghp == NULL) {
241 if ((ghp = malloc(sizeof (Grp_hdl))) == NULL)
248 if (aplist_append(alpp, ghp, AL_CNT_GROUPS) == NULL) {
249 free(ghp);
257 ndx = (uintptr_t)ghp % HDLIST_SZ;
259 if (aplist_append(&hdl_alp[ndx], ghp, AL_CNT_HANDLES) == NULL) {
260 (void) aplist_delete_value(*alpp, ghp);
261 free(ghp);
265 ghp->gh_depends = NULL;
266 ghp->gh_refcnt = 1;
267 ghp->gh_flags = hflags;
278 ghp->gh_ownlmp = lml->lm_head;
279 ghp->gh_ownlml = lml;
281 ghp->gh_ownlmp = rlmp;
282 ghp->gh_ownlml = LIST(rlmp);
284 if (hdl_add(ghp, rlmp, rdflags, NULL) == NULL)
292 return (ghp);
317 if ((ghp->gh_refcnt++ == 0) &&
318 ((ghp->gh_flags & GPH_ZERO) == 0)) {
322 ndx = (uintptr_t)ghp % HDLIST_SZ;
324 (void) aplist_delete_value(hdl_alp[HDLIST_ORP], ghp);
325 (void) aplist_append(&hdl_alp[ndx], ghp,
333 for (ALIST_TRAVERSE(ghp->gh_depends, idx, gdp))
334 DBG_CALL(Dbg_file_hdl_action(ghp,
347 ghp->gh_refcnt--;
348 return (ghp);
355 if (ghp->gh_flags & GPH_PRIVATE) {
356 ghp->gh_refcnt = 1;
357 ghp->gh_flags &= ~GPH_PRIVATE;
358 ghp->gh_flags |= hflags;
368 if (clmp && (hdl_add(ghp, clmp, cdflags, NULL) == NULL))
371 return (ghp);
382 hdl_initialize(Grp_hdl *ghp, Rt_map *nlmp, int mode, int promote)
396 if (((ghp->gh_flags & GPH_INITIAL) && (promote == 0)) ||
398 ghp->gh_flags |= GPH_INITIAL;
403 for (ALIST_TRAVERSE(ghp->gh_depends, idx, gdp)) {
422 if (hdl_add(ghp, dlmp,
429 ghp->gh_flags |= GPH_INITIAL;
437 hdl_validate(Grp_hdl *ghp)
444 ndx = (uintptr_t)ghp % HDLIST_SZ;
447 if ((lghp == ghp) && (ghp->gh_refcnt != 0))
457 dlclose_core(Grp_hdl *ghp, Rt_map *clmp, Lm_list *lml)
472 if (ghp->gh_flags & GPH_ZERO) {
476 DBG_CALL(Dbg_dl_dlclose(clmp, NAME(ghp->gh_ownlmp),
483 if (--(ghp->gh_refcnt))
490 if (ghp->gh_flags & GPH_ZERO)
504 if (((lmp = ghp->gh_ownlmp) != NULL) &&
515 error = remove_hdl(ghp, clmp, NULL);
528 dlclose_intn(Grp_hdl *ghp, Rt_map *clmp)
541 olml = ghp->gh_ownlml;
543 error = dlclose_core(ghp, clmp, olml);
571 Grp_hdl *ghp = (Grp_hdl *)handle;
573 if (hdl_validate(ghp) == 0) {
576 (void) conv_invalid_val(&inv_buf, EC_NATPTR(ghp), 0);
583 return (dlclose_intn(ghp, clmp));
645 Grp_hdl *ghp;
668 Grp_hdl *ghp;
709 if ((ghp = hdl_create(lml, 0, clmp, hflags, rdflags,
723 return (ghp);
737 return (ghp);
768 &ghp, in_nfavl);
800 ghp = NULL;
819 return (ghp);
861 Grp_hdl *ghp;
909 ghp = dlmopen_core(lml, olml, path, mode, clmp, flags, orig, &in_nfavl);
917 if ((ghp == NULL) && in_nfavl) {
921 ghp = dlmopen_core(lml, olml, path, mode, clmp, flags, orig,
937 if (ghp && ((mode & RTLD_CONFGEN) == 0))
938 dlmp = ghp->gh_ownlmp;
953 if ((ghp == NULL) &&
966 return (ghp);
1020 Grp_hdl *ghp;
1028 ghp = dlmopen_check(lml, path, mode, clmp);
1032 return ((void *)ghp);
1045 Grp_hdl *ghp;
1051 ghp = dlmopen_check((Lm_list *)lmid, path, mode, clmp);
1055 return ((void *)ghp);
1062 dlsym_handle(Grp_hdl *ghp, Slookup *slp, Sresult *srp, uint_t *binfo,
1065 Rt_map *nlmp, * lmp = ghp->gh_ownlmp;
1087 if (ghp->gh_flags & GPH_ZERO) {
1101 if ((nlmp != lmp) && (ghp->gh_flags & GPH_FIRST))
1156 for (ALIST_TRAVERSE(ghp->gh_depends, idx, gdp)) {
1166 if (ghp->gh_flags & GPH_FIRST)
1184 for (ALIST_TRAVERSE(ghp->gh_depends, idx, gdp)) {
1365 Grp_hdl *ghp = (Grp_hdl *)handle;
1372 NAME(ghp->gh_ownlmp), DBG_DLSYM_DEF));
1374 ret = LM_DLSYM(clmp)(ghp, &sl, &sr, &binfo, in_nfavl);
1432 Grp_hdl *ghp = (Grp_hdl *)handle;
1434 if (ghp->gh_ownlmp)
1435 llmp = LIST(ghp->gh_ownlmp)->lm_tail;
1437 for (ALIST_TRAVERSE(ghp->gh_depends, idx, gdp)) {
1806 Grp_hdl *ghp = (Grp_hdl *)handle;
1808 if (hdl_validate(ghp))
1809 lmp = ghp->gh_ownlmp;