Lines Matching defs:th_p

84 td_err_e __td_thr_get_info(td_thrhandle_t *th_p, td_thrinfo_t *ti_p);
458 ph_lock_th(const td_thrhandle_t *th_p, td_err_e *err)
460 if (th_p == NULL || th_p->th_unique == NULL) {
464 return (ph_lock_ta(th_p->th_ta_p, err));
632 td_mapper_id2thr(td_thrhandle_t *th_p, td_mapper_param_t *data)
636 if (__td_thr_get_info(th_p, &ti) == TD_OK &&
639 data->th = *th_p;
651 td_thrhandle_t *th_p)
656 if (th_p != NULL && /* optimize for a single thread */
663 th_p->th_ta_p = ta_p;
664 if ((th_p->th_unique = ta_p->single_ulwp_addr) == 0)
676 if (th_p == NULL)
691 *th_p = data.th;
1366 __td_thr_get_info(td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
1377 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
1379 ta_p = th_p->th_ta_p;
1389 psaddr = th_p->th_unique;
1470 mod_eventset(td_thrhandle_t *th_p, td_thr_events_t *events, int onoff)
1479 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
1481 if (th_p->th_ta_p->model == PR_MODEL_NATIVE) {
1482 ulwp_t *ulwp = (ulwp_t *)th_p->th_unique;
1487 ulwp32_t *ulwp = (ulwp32_t *)th_p->th_unique;
1491 ph_unlock(th_p->th_ta_p);
1496 ph_unlock(th_p->th_ta_p);
1521 ph_unlock(th_p->th_ta_p);
1534 __td_thr_event_enable(td_thrhandle_t *th_p, int onoff)
1540 return (mod_eventset(th_p, &evset, onoff));
1556 __td_thr_set_event(td_thrhandle_t *th_p, td_thr_events_t *events)
1558 return (mod_eventset(th_p, events, 1));
1613 __td_thr_clear_event(td_thrhandle_t *th_p, td_thr_events_t *events)
1615 return (mod_eventset(th_p, events, 0));
1637 __td_thr_event_getmsg(td_thrhandle_t *th_p, td_event_msg_t *msg)
1643 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
1646 ph_unlock(th_p->th_ta_p);
1649 if (th_p->th_ta_p->model == PR_MODEL_NATIVE) {
1650 ulwp_t *ulwp = (ulwp_t *)th_p->th_unique;
1660 msg->th_p = (td_thrhandle_t *)th_p;
1671 ulwp32_t *ulwp = (ulwp32_t *)th_p->th_unique;
1681 msg->th_p = (td_thrhandle_t *)th_p;
1696 ph_unlock(th_p->th_ta_p);
1705 event_msg_cb(const td_thrhandle_t *th_p, void *arg)
1710 if (__td_thr_event_getmsg((td_thrhandle_t *)th_p, msg) == TD_OK) {
1716 * for the thread handle because th_p is a pointer
1720 th = *th_p;
1721 msg->th_p = &th;
1759 thr_to_lwpid(const td_thrhandle_t *th_p)
1761 struct ps_prochandle *ph_p = th_p->th_ta_p->ph_p;
1768 if (th_p->th_ta_p->model == PR_MODEL_NATIVE) {
1769 ulwp_t *ulwp = (ulwp_t *)th_p->th_unique;
1778 ulwp32_t *ulwp = (ulwp32_t *)th_p->th_unique;
1799 __td_thr_dbsuspend(const td_thrhandle_t *th_p)
1804 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
1806 if (ps_lstop(ph_p, thr_to_lwpid(th_p)) != PS_OK)
1808 ph_unlock(th_p->th_ta_p);
1818 __td_thr_dbresume(const td_thrhandle_t *th_p)
1823 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
1825 if (ps_lcontinue(ph_p, thr_to_lwpid(th_p)) != PS_OK)
1827 ph_unlock(th_p->th_ta_p);
1838 __td_thr_sigsetmask(const td_thrhandle_t *th_p, const sigset_t ti_sigmask)
1850 __td_thr_setsigpending(const td_thrhandle_t *th_p,
1861 __td_thr_getgregs(td_thrhandle_t *th_p, prgregset_t regset)
1866 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
1869 ph_unlock(th_p->th_ta_p);
1873 if (ps_lgetregs(ph_p, thr_to_lwpid(th_p), regset) != PS_OK)
1877 ph_unlock(th_p->th_ta_p);
1886 __td_thr_setgregs(td_thrhandle_t *th_p, const prgregset_t regset)
1891 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
1894 ph_unlock(th_p->th_ta_p);
1898 if (ps_lsetregs(ph_p, thr_to_lwpid(th_p), regset) != PS_OK)
1902 ph_unlock(th_p->th_ta_p);
1911 __td_thr_getfpregs(td_thrhandle_t *th_p, prfpregset_t *fpregset)
1916 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
1919 ph_unlock(th_p->th_ta_p);
1923 if (ps_lgetfpregs(ph_p, thr_to_lwpid(th_p), fpregset) != PS_OK)
1927 ph_unlock(th_p->th_ta_p);
1936 __td_thr_setfpregs(td_thrhandle_t *th_p, const prfpregset_t *fpregset)
1941 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
1944 ph_unlock(th_p->th_ta_p);
1948 if (ps_lsetfpregs(ph_p, thr_to_lwpid(th_p), fpregset) != PS_OK)
1952 ph_unlock(th_p->th_ta_p);
1963 __td_thr_getxregsize(td_thrhandle_t *th_p, int *xregsize)
1969 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
1972 ph_unlock(th_p->th_ta_p);
1976 if (ps_lgetxregsize(ph_p, thr_to_lwpid(th_p), xregsize) != PS_OK)
1980 ph_unlock(th_p->th_ta_p);
1993 __td_thr_getxregs(td_thrhandle_t *th_p, void *xregset)
1999 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
2002 ph_unlock(th_p->th_ta_p);
2006 if (ps_lgetxregs(ph_p, thr_to_lwpid(th_p), (caddr_t)xregset) != PS_OK)
2010 ph_unlock(th_p->th_ta_p);
2023 __td_thr_setxregs(td_thrhandle_t *th_p, const void *xregset)
2029 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
2032 ph_unlock(th_p->th_ta_p);
2036 if (ps_lsetxregs(ph_p, thr_to_lwpid(th_p), (caddr_t)xregset) != PS_OK)
2040 ph_unlock(th_p->th_ta_p);
2053 * Check the struct thread address in *th_p again first
2060 td_searcher(const td_thrhandle_t *th_p, void *data)
2064 if (searcher_data->addr == th_p->th_unique) {
2074 * corresponds to thread with handle *th_p.
2079 __td_thr_validate(const td_thrhandle_t *th_p)
2084 if (th_p == NULL)
2086 if (th_p->th_unique == NULL || th_p->th_ta_p == NULL)
2096 searcher_data.addr = th_p->th_unique;
2097 return_val = __td_ta_thr_iter(th_p->th_ta_p,
2115 __td_thr_tsd(td_thrhandle_t *th_p, thread_key_t key, void **data_pp)
2127 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
2129 ta_p = th_p->th_ta_p;
2136 ulwp_t *ulwp = (ulwp_t *)th_p->th_unique;
2159 ulwp32_t *ulwp = (ulwp32_t *)th_p->th_unique;
2232 __td_thr_tlsbase(td_thrhandle_t *th_p, ulong_t moduleid, psaddr_t *base)
2241 if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
2243 ta_p = th_p->th_ta_p;
2250 ulwp_t *ulwp = (ulwp_t *)th_p->th_unique;
2285 ulwp32_t *ulwp = (ulwp32_t *)th_p->th_unique;
2335 __td_thr_setprio(td_thrhandle_t *th_p, int ti_pri)
2346 td_thrhandle_t *th_p;
2367 rw_m.mx.mutex_owner == ocb->th_p->th_unique)
2371 if (rwlock->mutex_owner == ocb->th_p->th_unique)
2383 __td_thr_lockowner(const td_thrhandle_t *th_p, td_sync_iter_f *cb,
2393 if (ph_lock_th((td_thrhandle_t *)th_p, &return_val) == NULL)
2395 ta_p = th_p->th_ta_p;
2400 lcb.th_p = (td_thrhandle_t *)th_p;
2410 __td_thr_sleepinfo(const td_thrhandle_t *th_p, td_synchandle_t *sh_p)
2418 if ((ph_p = ph_lock_th((td_thrhandle_t *)th_p, &return_val)) == NULL)
2424 if (th_p->th_ta_p->model == PR_MODEL_NATIVE) {
2425 ulwp_t *ulwp = (ulwp_t *)th_p->th_unique;
2432 ulwp32_t *ulwp = (ulwp32_t *)th_p->th_unique;
2450 sh_p->sh_ta_p = th_p->th_ta_p;
2454 ph_unlock(th_p->th_ta_p);
2464 td_thrhandle_t *th_p)
2466 return (__td_ta_map_id2thr(ta_p, lwpid, th_p));
2969 waiters_cb(const td_thrhandle_t *th_p, void *arg)
2971 td_thragent_t *ta_p = th_p->th_ta_p;
2977 ulwp_t *ulwp = (ulwp_t *)th_p->th_unique;
2986 ulwp32_t *ulwp = (ulwp32_t *)th_p->th_unique;
3005 return ((*wcb->waiter_cb)(th_p, wcb->waiter_cb_arg));