Lines Matching defs:t
180 * we don't have enough data.
318 case PCDSTOP: /* direct process or lwp to stop, don't wait */
325 * Can't apply to a system process.
340 * don't wait. The stopped lwp would never see the
406 kthread_t *t = pr_thread(pnp);
408 if (!ISTOPPED(t) && !VSTOPPED(t) && !DSTOPPED(t)) {
409 thread_unlock(t);
412 thread_unlock(t);
414 prsetprregs(ttolwp(t), argp->prgregset, 0);
598 * we don't have enough data.
694 * can't simply pass a pointer to the structure as
747 case PCDSTOP: /* direct process or lwp to stop, don't wait */
754 * Can't apply to a system process.
769 * don't wait. The lwp will never see the fact that
846 kthread_t *t = pr_thread(pnp);
848 if (!ISTOPPED(t) && !VSTOPPED(t) && !DSTOPPED(t)) {
849 thread_unlock(t);
853 klwp_t *lwp = ttolwp(t);
855 thread_unlock(t);
928 kthread_t *t = pr_thread(pnp);
929 klwp_t *lwp = ttolwp(t);
930 thread_unlock(t);
994 * Returns with the thread locked via thread_lock(t).
1000 kthread_t *t;
1003 t = pcp->prc_thread;
1004 ASSERT(t != NULL);
1005 thread_lock(t);
1008 t = prchoose(p); /* returns locked thread */
1009 ASSERT(t != NULL);
1012 return (t);
1023 kthread_t *t;
1038 t = pcp->prc_thread;
1040 t = p->p_tlist;
1041 ASSERT(t != NULL);
1047 thread_lock(t);
1048 if (!ISTOPPED(t)) {
1049 t->t_proc_flag |= TP_PRSTOP;
1050 t->t_sig_check = 1; /* do ISSIG */
1054 if (ISWAITING(t))
1055 setrun_locked(t);
1057 if (ISWAKEABLE(t)) {
1058 if (t->t_wchan0 == NULL)
1059 setrun_locked(t);
1060 else if (!VSTOPPED(t)) {
1064 t->t_proc_flag |= TP_PRVSTOP;
1072 prpokethread(t);
1073 thread_unlock(t);
1075 (vp = p->p_lwpdir[t->t_dslot].ld_entry->le_trace) != NULL)
1079 } while ((t = t->t_forw) != p->p_tlist);
1090 * jobcontrol: Don't wake up if the lwp is stopped
1103 kthread_t *t;
1121 t = pcp->prc_thread;
1122 ASSERT(t != NULL);
1123 thread_lock(t);
1124 while (!ISTOPPED(t) && !VSTOPPED(t)) {
1125 thread_unlock(t);
1134 ASSERT(t == pcp->prc_thread);
1135 thread_lock(t);
1137 thread_unlock(t);
1139 t = prchoose(p); /* returns locked thread */
1140 ASSERT(t != NULL);
1142 while ((!ISTOPPED(t) && !VSTOPPED(t) && !SUSPENDED(t)) ||
1144 thread_unlock(t);
1153 t = prchoose(p); /* returns locked t */
1154 ASSERT(t != NULL);
1156 thread_unlock(t);
1160 t != NULL && t->t_state != TS_ZOMB);
1170 kthread_t *t;
1178 t = pr_thread(pnp); /* returns locked thread */
1179 if ((!ISTOPPED(t) && !VSTOPPED(t) &&
1180 !(t->t_proc_flag & TP_PRSTOP)) ||
1182 (t != p->p_agenttp || !(pcp->prc_flags & PRC_LWP)))) {
1183 thread_unlock(t);
1186 thread_unlock(t);
1189 lwp = ttolwp(t);
1204 * We can't hold p->p_lock when we touch the lwp's registers.
1213 t->t_proc_flag |= TP_PRSTOP;
1214 t->t_sig_check = 1; /* do ISSIG */
1218 thread_lock(t);
1223 if (ISTOPPED(t)) {
1224 t->t_schedflag |= TS_PSTART;
1225 t->t_dtrace_stop = 0;
1226 setrun_locked(t);
1228 t->t_proc_flag &=
1230 setrun_locked(t);
1232 t->t_proc_flag &=
1235 thread_unlock(t);
1240 if (ISTOPPED(t)) {
1253 t->t_whystop == PR_SYSENTRY &&
1254 t->t_whatstop == SYS_lwp_exit)
1255 tx = t; /* remember the exiting lwp */
1256 t->t_whystop = PR_REQUESTED;
1257 t->t_whatstop = 0;
1258 thread_unlock(t);
1259 t = prchoose(p); /* returns locked t */
1260 ASSERT(ISTOPPED(t) || VSTOPPED(t));
1261 if (VSTOPPED(t) ||
1262 t->t_whystop == PR_REQUESTED) {
1263 thread_unlock(t);
1266 thread_unlock(t);
1278 t->t_dtrace_stop = 0;
1288 t->t_proc_flag &=
1290 setrun_locked(t);
1292 thread_unlock(t);
1329 kthread_t *t;
1333 if ((t = p->p_tlist) != NULL) {
1335 thread_lock(t);
1336 ASSERT(!(t->t_proc_flag & TP_LWPEXIT));
1337 t->t_proc_flag &= ~(TP_PRSTOP|TP_PRVSTOP|TP_STOPPING);
1338 if (ISTOPPED(t)) {
1339 t->t_schedflag |= TS_PSTART;
1340 t->t_dtrace_stop = 0;
1341 setrun_locked(t);
1343 thread_unlock(t);
1344 } while ((t = t->t_forw) != p->p_tlist);
1387 kthread_t *t;
1391 t = pr_thread(pnp); /* returns locked thread */
1392 thread_unlock(t);
1393 lwp = ttolwp(t);
1398 /* "can't happen", but just in case */
1431 * GLOBAL_ZONEID, this means that you can't pr_setsig a
1477 thread_lock(t);
1478 if (ISWAKEABLE(t) || ISWAITING(t)) {
1480 setrun_locked(t);
1481 } else if (t->t_state == TS_STOPPED && sig == SIGKILL) {
1484 t->t_schedflag |= TS_XSTART | TS_PSTART;
1485 t->t_dtrace_stop = 0;
1486 setrun_locked(t);
1488 t->t_sig_check = 1; /* so ISSIG will be done */
1489 thread_unlock(t);
1558 kthread_t *t;
1562 t = p->p_tlist;
1564 ASSERT(!(t->t_proc_flag & TP_LWPEXIT));
1565 err = CL_DONICE(t, cr, nice, (int *)NULL);
1566 schedctl_set_cidpri(t);
1569 } while ((t = t->t_forw) != p->p_tlist);
1667 kthread_t *t = pr_thread(pnp); /* returns locked thread */
1669 if (!ISTOPPED(t) && !VSTOPPED(t) && !DSTOPPED(t)) {
1670 thread_unlock(t);
1674 thread_unlock(t);
1679 thread_unlock(t);
1681 prsetprfpregs(ttolwp(t), prfpregset);
1692 kthread_t *t = pr_thread(pnp); /* returns locked thread */
1694 if (!ISTOPPED(t) && !VSTOPPED(t) && !DSTOPPED(t)) {
1695 thread_unlock(t);
1699 thread_unlock(t);
1704 thread_unlock(t);
1706 prsetprfpregs32(ttolwp(t), prfpregset);
1719 kthread_t *t = pr_thread(pnp); /* returns locked thread */
1721 if (!ISTOPPED(t) && !VSTOPPED(t) && !DSTOPPED(t)) {
1722 thread_unlock(t);
1725 thread_unlock(t);
1732 prsetprxregs(ttolwp(t), (caddr_t)prxregset);
1742 kthread_t *t = pr_thread(pnp); /* returns locked thread */
1744 if (!ISTOPPED(t) && !VSTOPPED(t) && !DSTOPPED(t)) {
1745 thread_unlock(t);
1748 thread_unlock(t);
1752 prsetasregs(ttolwp(t), asrset);
1763 kthread_t *t = pr_thread(pnp); /* returns locked thread */
1765 if (!ISTOPPED(t) && !VSTOPPED(t) && !DSTOPPED(t)) {
1766 thread_unlock(t);
1771 thread_unlock(t);
1773 prsvaddr(ttolwp(t), vaddr);
1783 kthread_t *t = pr_thread(pnp); /* returns locked thread */
1785 schedctl_finish_sigblock(t);
1786 sigutok(sp, &t->t_hold);
1787 if (ISWAKEABLE(t) &&
1788 (fsig(&p->p_sig, t) || fsig(&t->t_sig, t)))
1789 setrun_locked(t);
1790 t->t_sig_check = 1; /* so thread will see new holdmask */
1791 thread_unlock(t);
1810 kthread_t *t = pr_thread(pnp); /* returns locked thread */
1811 klwp_t *lwp = ttolwp(t);
1813 thread_unlock(t);
1833 kthread_t *t = pr_thread(pnp); /* returns locked thread */
1835 thread_unlock(t);
1836 ttolwp(t)->lwp_curflt = 0;
1856 * Can't apply to a system process.
1873 * Don't let the address range go above as->a_userlimit.
1960 #define JDSTOPPED(t) \
1961 ((t)->t_state == TS_STOPPED && \
1962 (t)->t_whystop == PR_JOBCONTROL && \
1963 ((t)->t_proc_flag & TP_PRSTOP))
1975 kthread_t *t;
1993 t = prchoose(p); /* returns locked thread */
1994 ASSERT(t != NULL);
1996 if ((!ISTOPPED(t) && !VSTOPPED(t) && !SUSPENDED(t) && !JDSTOPPED(t)) ||
1999 thread_unlock(t);
2003 thread_unlock(t);
2009 t->t_pri, &smask, NOCLASS, 0);
2033 cid = t->t_cid;
2036 if (cid != t->t_cid) {
2040 * don't hit this often.
2050 ct->t_clfuncs = t->t_clfuncs;
2051 CL_FORK(t, ct, bufp);
2052 ct->t_cid = t->t_cid;
2073 * Don't return until the agent is stopped on PR_REQUESTED.
2169 kthread_t *t;
2211 /* hold old cred so it doesn't disappear while we dup it */
2253 t = p->p_tlist;
2255 t->t_pre_sys = 1; /* so syscall will get new cred */
2256 } while ((t = t->t_forw) != p->p_tlist);
2269 kthread_t *t;
2315 t = p->p_tlist;
2317 t->t_pre_sys = 1; /* so syscall will get new cred */
2318 } while ((t = t->t_forw) != p->p_tlist);
2326 kthread_t *t;
2335 t = p->p_tlist;
2337 t->t_pre_sys = 1; /* so syscall will get new cred */
2338 } while ((t = t->t_forw) != p->p_tlist);
2357 kthread_t *t;
2365 if ((t = p->p_tlist) != NULL) {
2367 if (t == curthread || VSTOPPED(t) ||
2368 (watchstop && (t->t_proc_flag & TP_WATCHSTOP)))
2370 thread_lock(t);
2371 switch (t->t_state) {
2376 if (!(t->t_flag & T_WAKEABLE) ||
2377 t->t_wchan0 == NULL)
2384 thread_unlock(t);
2385 } while (rv == 0 && (t = t->t_forw) != p->p_tlist);
2397 kthread_t *t;
2402 if ((t = p->p_tlist) != NULL) {
2404 thread_lock(t);
2405 t->t_proc_flag |= TP_PAUSE;
2406 aston(t);
2407 if ((ISWAKEABLE(t) && (t->t_wchan0 == NULL)) ||
2408 ISWAITING(t)) {
2409 setrun_locked(t);
2411 prpokethread(t);
2412 thread_unlock(t);
2413 } while ((t = t->t_forw) != p->p_tlist);
2423 kthread_t *t;
2428 if ((t = p->p_tlist) != NULL) {
2430 thread_lock(t);
2431 t->t_proc_flag &= ~TP_PAUSE;
2432 if (t->t_state == TS_STOPPED) {
2433 t->t_schedflag |= TS_UNPAUSE;
2434 t->t_dtrace_stop = 0;
2435 setrun_locked(t);
2437 thread_unlock(t);
2438 } while ((t = t->t_forw) != p->p_tlist);
2450 kthread_t *t;
2494 if ((t = p->p_tlist) != NULL) {
2496 watch_disable(t);
2498 } while ((t = t->t_forw) != p->p_tlist);