Lines Matching refs:twp
59 thread_walk_t *twp = mdb_alloc(sizeof (thread_walk_t), UM_SLEEP); in thread_walk_init() local
64 mdb_free(twp, sizeof (thread_walk_t)); in thread_walk_init()
68 twp->tw_inproc = FALSE; in thread_walk_init()
75 mdb_free(twp, sizeof (thread_walk_t)); in thread_walk_init()
80 twp->tw_inproc = TRUE; in thread_walk_init()
83 twp->tw_thread = mdb_alloc(sizeof (kthread_t), UM_SLEEP); in thread_walk_init()
84 twp->tw_last = wsp->walk_addr; in thread_walk_init()
85 twp->tw_step = FALSE; in thread_walk_init()
87 wsp->walk_data = twp; in thread_walk_init()
94 thread_walk_t *twp = (thread_walk_t *)wsp->walk_data; in thread_walk_step() local
100 if (twp->tw_step && wsp->walk_addr == twp->tw_last) in thread_walk_step()
103 if (mdb_vread(twp->tw_thread, sizeof (kthread_t), in thread_walk_step()
109 status = wsp->walk_callback(wsp->walk_addr, twp->tw_thread, in thread_walk_step()
112 if (twp->tw_inproc) in thread_walk_step()
113 wsp->walk_addr = (uintptr_t)twp->tw_thread->t_forw; in thread_walk_step()
115 wsp->walk_addr = (uintptr_t)twp->tw_thread->t_next; in thread_walk_step()
117 twp->tw_step = TRUE; in thread_walk_step()
124 thread_walk_t *twp = (thread_walk_t *)wsp->walk_data; in thread_walk_fini() local
126 mdb_free(twp->tw_thread, sizeof (kthread_t)); in thread_walk_fini()
127 mdb_free(twp, sizeof (thread_walk_t)); in thread_walk_fini()