diff options
author | bde <bde@FreeBSD.org> | 1995-07-21 20:57:15 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-07-21 20:57:15 +0000 |
commit | fb20709ee5835b6c531ad29810bb232d88e3c761 (patch) | |
tree | db33219710f2340ec77d1ff981215fd6baee9b6f /sys/kern | |
parent | daf18dea5d745b2eb3faa60b23438209a50706f3 (diff) | |
download | FreeBSD-src-fb20709ee5835b6c531ad29810bb232d88e3c761.zip FreeBSD-src-fb20709ee5835b6c531ad29810bb232d88e3c761.tar.gz |
Obtained from: partly from ancient patches by ache and me via 1.1.5
Nuke `symbolic sleep message strings'. Use unique literal messages so that
`ps l' shows unambiguously where processes are sleeping.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty.c | 35 | ||||
-rw-r--r-- | sys/kern/tty_pty.c | 17 |
2 files changed, 23 insertions, 29 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index f073e10..07624d3 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.c 8.8 (Berkeley) 1/21/94 - * $Id: tty.c,v 1.52 1995/07/21 16:30:51 bde Exp $ + * $Id: tty.c,v 1.53 1995/07/21 17:30:12 bde Exp $ */ /*- @@ -99,14 +99,6 @@ static void ttyblock __P((struct tty *tp)); static void ttyecho __P((int, struct tty *tp)); static void ttyrubo __P((struct tty *, int)); -/* Symbolic sleep message strings. */ -char ttclos[] = "ttycls"; -char ttopen[] = "ttyopn"; -char ttybg[] = "ttybg"; -char ttybuf[] = "ttybuf"; -char ttyin[] = "ttyin"; -char ttyout[] = "ttyout"; - /* * Table with character classes and parity. The 8th bit indicates parity, * the 7th bit indicates the character is an alphameric or underscore (for @@ -720,7 +712,8 @@ ttioctl(tp, cmd, data, flag) (p->p_sigignore & sigmask(SIGTTOU)) == 0 && (p->p_sigmask & sigmask(SIGTTOU)) == 0) { pgsignal(p->p_pgrp, SIGTTOU, 1); - error = ttysleep(tp, &lbolt, TTOPRI | PCATCH, ttybg, 0); + error = ttysleep(tp, &lbolt, TTOPRI | PCATCH, "ttybg1", + 0); if (error) return (error); } @@ -1386,7 +1379,7 @@ loop: p->p_flag & P_PPWAIT || p->p_pgrp->pg_jobc == 0) return (EIO); pgsignal(p->p_pgrp, SIGTTIN, 1); - error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, ttybg, 0); + error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, "ttybg2", 0); if (error) return (error); goto loop; @@ -1511,7 +1504,8 @@ sleep: return (0); /* EOF */ } error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH, - carrier ? ttyin : ttopen, (int)slp); + carrier ? + "ttyin" : "ttyhup", (int)slp); splx(s); if (error == EWOULDBLOCK) error = 0; @@ -1576,8 +1570,8 @@ slowcase: if (CCEQ(cc[VDSUSP], c) && ISSET(lflag, ISIG)) { pgsignal(tp->t_pgrp, SIGTSTP, 1); if (first) { - error = ttysleep(tp, - &lbolt, TTIPRI | PCATCH, ttybg, 0); + error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, + "ttybg3", 0); if (error) break; goto loop; @@ -1703,8 +1697,8 @@ loop: goto out; } else { /* Sleep awaiting carrier. */ - error = ttysleep(tp, - &tp->t_rawq, TTIPRI | PCATCH,ttopen, 0); + error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH, + "ttydcd", 0); splx(s); if (error) goto out; @@ -1722,7 +1716,7 @@ loop: (p->p_sigmask & sigmask(SIGTTOU)) == 0 && p->p_pgrp->pg_jobc) { pgsignal(p->p_pgrp, SIGTTOU, 1); - error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, ttybg, 0); + error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, "ttybg4", 0); if (error) goto out; goto loop; @@ -1785,7 +1779,8 @@ loop: goto out; } error = ttysleep(tp, &lbolt, - TTOPRI | PCATCH, ttybuf, 0); + TTOPRI|PCATCH, + "ttybf1", 0); if (error) goto out; goto loop; @@ -1819,8 +1814,8 @@ loop: error = EWOULDBLOCK; goto out; } - error = ttysleep(tp, - &lbolt, TTOPRI | PCATCH, ttybuf, 0); + error = ttysleep(tp, &lbolt, TTOPRI | PCATCH, + "ttybf2", 0); if (error) goto out; goto loop; diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index e67fc65..0a582fe 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tty_pty.c 8.2 (Berkeley) 9/23/93 - * $Id: tty_pty.c,v 1.11 1995/05/30 08:06:14 rgrimes Exp $ + * $Id: tty_pty.c,v 1.12 1995/07/21 16:30:52 bde Exp $ */ /* @@ -137,7 +137,7 @@ ptsopen(dev, flag, devtype, p) if (flag&FNONBLOCK) break; error = ttysleep(tp, (caddr_t)&tp->t_rawq, TTIPRI | PCATCH, - ttopen, 0); + "ptsopn", 0); if (error) return (error); } @@ -183,16 +183,16 @@ again: p->p_flag & P_PPWAIT) return (EIO); pgsignal(p->p_pgrp, SIGTTIN, 1); - error = ttysleep(tp, (caddr_t)&lbolt, - TTIPRI | PCATCH, ttybg, 0); + error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, "ptsbg", + 0); if (error) return (error); } if (tp->t_canq.c_cc == 0) { if (flag & IO_NDELAY) return (EWOULDBLOCK); - error = ttysleep(tp, (caddr_t)&tp->t_canq, - TTIPRI | PCATCH, ttyin, 0); + error = ttysleep(tp, &tp->t_canq, TTIPRI | PCATCH, + "ptsin", 0); if (error) return (error); goto again; @@ -361,8 +361,7 @@ ptcread(dev, uio, flag) return (0); /* EOF */ if (flag & IO_NDELAY) return (EWOULDBLOCK); - error = tsleep((caddr_t)&tp->t_outq.c_cf, TTIPRI | PCATCH, - ttyin, 0); + error = tsleep(&tp->t_outq.c_cf, TTIPRI | PCATCH, "ptcin", 0); if (error) return (error); } @@ -542,7 +541,7 @@ block: return (EWOULDBLOCK); return (0); } - error = tsleep((caddr_t)&tp->t_rawq.c_cl, TTOPRI | PCATCH, ttyout, 0); + error = tsleep(&tp->t_rawq.c_cl, TTOPRI | PCATCH, "ptcout", 0); if (error) { /* adjust for data copied in but not written */ uio->uio_resid += cc; |