Lines Matching refs:diw
338 devinfo_walk_data_t *diw; in devinfo_walk_init() local
341 diw = mdb_alloc(sizeof (devinfo_walk_data_t), UM_SLEEP); in devinfo_walk_init()
342 diw->diw_parent = *wsp; in devinfo_walk_init()
343 diw->diw_child = *wsp; in devinfo_walk_init()
344 wsp->walk_data = diw; in devinfo_walk_init()
346 diw->diw_mode = DIW_PARENT; in devinfo_walk_init()
348 if (devinfo_parents_walk_init(&diw->diw_parent) == -1) { in devinfo_walk_init()
349 mdb_free(diw, sizeof (devinfo_walk_data_t)); in devinfo_walk_init()
358 dip = diw->diw_parent.walk_data; in devinfo_walk_init()
359 diw->diw_child.walk_arg = &dip->dip_base_depth; in devinfo_walk_init()
361 if (devinfo_children_walk_init(&diw->diw_child) == -1) { in devinfo_walk_init()
362 devinfo_parents_walk_fini(&diw->diw_parent); in devinfo_walk_init()
363 mdb_free(diw, sizeof (devinfo_walk_data_t)); in devinfo_walk_init()
373 devinfo_walk_data_t *diw = wsp->walk_data; in devinfo_walk_step() local
376 if (diw->diw_mode == DIW_PARENT) { in devinfo_walk_step()
377 status = devinfo_parents_walk_step(&diw->diw_parent); in devinfo_walk_step()
382 diw->diw_mode = DIW_CHILD; in devinfo_walk_step()
385 } else if (diw->diw_mode == DIW_CHILD) { in devinfo_walk_step()
386 status = devinfo_children_walk_step(&diw->diw_child); in devinfo_walk_step()
388 diw->diw_mode = DIW_DONE; in devinfo_walk_step()
400 devinfo_walk_data_t *diw = wsp->walk_data; in devinfo_walk_fini() local
402 devinfo_children_walk_fini(&diw->diw_child); in devinfo_walk_fini()
403 devinfo_parents_walk_fini(&diw->diw_parent); in devinfo_walk_fini()
404 mdb_free(diw, sizeof (devinfo_walk_data_t)); in devinfo_walk_fini()