Lines Matching refs:ftp
51 fmd_topo_rele_locked(fmd_topo_t *ftp) in fmd_topo_rele_locked() argument
55 if (--ftp->ft_refcount == 0) { in fmd_topo_rele_locked()
56 fmd_list_delete(&fmd.d_topo_list, ftp); in fmd_topo_rele_locked()
57 topo_close(ftp->ft_hdl); in fmd_topo_rele_locked()
58 fmd_free(ftp, sizeof (fmd_topo_t)); in fmd_topo_rele_locked()
67 fmd_topo_t *ftp, *prev; in fmd_topo_update() local
85 ftp = fmd_alloc(sizeof (fmd_topo_t), FMD_SLEEP); in fmd_topo_update()
86 ftp->ft_hdl = tp; in fmd_topo_update()
87 ftp->ft_time_begin = fmd_time_gethrtime(); in fmd_topo_update()
95 ftp->ft_time_end = fmd_time_gethrtime(); in fmd_topo_update()
105 ftp->ft_refcount = 1; in fmd_topo_update()
106 fmd_list_prepend(&fmd.d_topo_list, ftp); in fmd_topo_update()
114 fmd_topo_t *ftp; in fmd_topo_hold() local
117 ftp = fmd_list_next(&fmd.d_topo_list); in fmd_topo_hold()
118 ftp->ft_refcount++; in fmd_topo_hold()
121 return (ftp); in fmd_topo_hold()
125 fmd_topo_addref(fmd_topo_t *ftp) in fmd_topo_addref() argument
128 ftp->ft_refcount++; in fmd_topo_addref()
133 fmd_topo_rele(fmd_topo_t *ftp) in fmd_topo_rele() argument
137 fmd_topo_rele_locked(ftp); in fmd_topo_rele()
145 fmd_topo_t *ftp; in fmd_topo_rele_hdl() local
148 for (ftp = fmd_list_next(&fmd.d_topo_list); ftp != NULL; in fmd_topo_rele_hdl()
149 ftp = fmd_list_next(ftp)) { in fmd_topo_rele_hdl()
150 if (ftp->ft_hdl == thp) in fmd_topo_rele_hdl()
153 ASSERT(ftp != NULL); in fmd_topo_rele_hdl()
155 fmd_topo_rele_locked(ftp); in fmd_topo_rele_hdl()
168 fmd_topo_t *ftp; in fmd_topo_fini() local
171 while ((ftp = fmd_list_next(&fmd.d_topo_list)) != NULL) { in fmd_topo_fini()
172 fmd_list_delete(&fmd.d_topo_list, ftp); in fmd_topo_fini()
173 topo_close(ftp->ft_hdl); in fmd_topo_fini()
174 fmd_free(ftp, sizeof (fmd_topo_t)); in fmd_topo_fini()