Lines Matching refs:twp
60 thread_walk_t *twp = mdb_alloc(sizeof (thread_walk_t), UM_SLEEP); in thread_walk_init() local
65 mdb_free(twp, sizeof (thread_walk_t)); in thread_walk_init()
69 twp->tw_inproc = FALSE; in thread_walk_init()
76 mdb_free(twp, sizeof (thread_walk_t)); in thread_walk_init()
81 twp->tw_inproc = TRUE; in thread_walk_init()
84 twp->tw_thread = mdb_alloc(sizeof (kthread_t), UM_SLEEP); in thread_walk_init()
85 twp->tw_last = wsp->walk_addr; in thread_walk_init()
86 twp->tw_step = FALSE; in thread_walk_init()
88 wsp->walk_data = twp; in thread_walk_init()
95 thread_walk_t *twp = (thread_walk_t *)wsp->walk_data; in thread_walk_step() local
101 if (twp->tw_step && wsp->walk_addr == twp->tw_last) in thread_walk_step()
104 if (mdb_vread(twp->tw_thread, sizeof (kthread_t), in thread_walk_step()
110 status = wsp->walk_callback(wsp->walk_addr, twp->tw_thread, in thread_walk_step()
113 if (twp->tw_inproc) in thread_walk_step()
114 wsp->walk_addr = (uintptr_t)twp->tw_thread->t_forw; in thread_walk_step()
116 wsp->walk_addr = (uintptr_t)twp->tw_thread->t_next; in thread_walk_step()
118 twp->tw_step = TRUE; in thread_walk_step()
125 thread_walk_t *twp = (thread_walk_t *)wsp->walk_data; in thread_walk_fini() local
127 mdb_free(twp->tw_thread, sizeof (kthread_t)); in thread_walk_fini()
128 mdb_free(twp, sizeof (thread_walk_t)); in thread_walk_fini()