Export thread address.
This commit is contained in:
parent
c339c21b28
commit
2ec2da8602
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144663
@ -293,6 +293,7 @@ pt_ta_map_id2thr(const td_thragent_t *ta, thread_t id, td_thrhandle_t *th)
|
||||
}
|
||||
th->th_ta = ta;
|
||||
th->th_tid = id;
|
||||
th->th_thread = pt;
|
||||
return (TD_OK);
|
||||
}
|
||||
|
||||
@ -327,6 +328,7 @@ pt_ta_map_lwp2thr(const td_thragent_t *ta, lwpid_t lwp, td_thrhandle_t *th)
|
||||
if (th->th_tid == -1)
|
||||
return (TD_MALLOC);
|
||||
pt_unmap_lwp(ta, lwp);
|
||||
th->th_thread = pt;
|
||||
return (TD_OK);
|
||||
}
|
||||
|
||||
@ -371,6 +373,7 @@ pt_ta_thr_iter(const td_thragent_t *ta,
|
||||
while (pt != 0) {
|
||||
th.th_ta = ta;
|
||||
th.th_tid = pt_map_thread(ta, pt, PT_USER);
|
||||
th.th_thread = pt;
|
||||
/* should we unmap lwp here ? */
|
||||
if (th.th_tid == -1)
|
||||
return (TD_MALLOC);
|
||||
|
@ -296,6 +296,7 @@ pt_ta_map_id2thr(const td_thragent_t *ta, thread_t id, td_thrhandle_t *th)
|
||||
}
|
||||
th->th_ta = ta;
|
||||
th->th_tid = id;
|
||||
th->th_thread = pt;
|
||||
return (TD_OK);
|
||||
}
|
||||
|
||||
@ -333,6 +334,7 @@ pt_ta_map_lwp2thr(const td_thragent_t *ta, lwpid_t lwp, td_thrhandle_t *th)
|
||||
return (TD_NOTHR);
|
||||
th->th_ta = ta;
|
||||
th->th_tid = pt_map_thread(ta, lwp, pt);
|
||||
th->th_thread = pt;
|
||||
if (th->th_tid == -1)
|
||||
return (TD_MALLOC);
|
||||
return (TD_OK);
|
||||
@ -372,6 +374,7 @@ pt_ta_thr_iter(const td_thragent_t *ta,
|
||||
if (tmp_lwp != 0) {
|
||||
th.th_ta = ta;
|
||||
th.th_tid = pt_map_thread(ta, tmp_lwp, pt);
|
||||
th.th_thread = pt;
|
||||
if (th.th_tid == -1)
|
||||
return (TD_MALLOC);
|
||||
if ((*callback)(&th, cbdata_p))
|
||||
@ -518,6 +521,7 @@ pt_thr_get_info(const td_thrhandle_t *th, td_thrinfo_t *info)
|
||||
info->ti_tid = th->th_tid;
|
||||
info->ti_state = TD_THR_RUN;
|
||||
info->ti_type = TD_THR_SYSTEM;
|
||||
info->ti_thread = NULL;
|
||||
return (TD_OK);
|
||||
}
|
||||
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr + ta->thread_off_state,
|
||||
@ -526,6 +530,7 @@ pt_thr_get_info(const td_thrhandle_t *th, td_thrinfo_t *info)
|
||||
return (P2T(ret));
|
||||
info->ti_lid = ta->map[th->th_tid].lwp;
|
||||
info->ti_tid = th->th_tid;
|
||||
info->ti_thread = ta->map[th->th_tid].thr;
|
||||
info->ti_ta_p = th->th_ta;
|
||||
if (state == ta->thread_state_running)
|
||||
info->ti_state = TD_THR_RUN;
|
||||
|
@ -176,6 +176,7 @@ typedef pthread_key_t thread_key_t;
|
||||
typedef struct {
|
||||
const td_thragent_t *ti_ta_p;
|
||||
thread_t ti_tid;
|
||||
psaddr_t ti_thread;
|
||||
td_thr_state_e ti_state;
|
||||
td_thr_type_e ti_type;
|
||||
td_thr_events_t ti_events;
|
||||
|
Loading…
Reference in New Issue
Block a user