Date: Fri, 25 Jul 2008 14:53:24 GMT From: Ed Schouten <ed@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 145892 for review Message-ID: <200807251453.m6PErOhY091084@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=145892 Change 145892 by ed@ed_dull on 2008/07/25 14:52:30 Small cleanups to tty_info.c to make it more in sync with the stock sources. Affected files ... .. //depot/projects/mpsafetty/sys/kern/tty_info.c#3 edit Differences ... ==== //depot/projects/mpsafetty/sys/kern/tty_info.c#3 (text+ko) ==== @@ -41,13 +41,15 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/sys/kern/tty_info.c,v 1.1 2008/07/25 14:31:00 ed Exp $"); #include <sys/param.h> -#include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> #include <sys/proc.h> #include <sys/resourcevar.h> #include <sys/sched.h> +#include <sys/systm.h> #include <sys/tty.h> #include <vm/vm.h> @@ -205,6 +207,9 @@ return (p2->p_pid > p1->p_pid); /* tie - return highest pid */ } +/* + * Report on state of foreground process group. + */ void tty_info(struct tty *tp) { @@ -227,25 +232,18 @@ load = (averunnable.ldavg[0] * 100 + FSCALE / 2) >> FSHIFT; ttyprintf(tp, "load: %d.%02d ", load / 100, load % 100); - /* - * On return following a ttyprintf(), we set tp->t_rocount to 0 so - * that pending input will be retyped on BS. - */ if (tp->t_session == NULL) { ttyprintf(tp, "not a controlling terminal\n"); - /*tp->t_rocount = 0;*/ return; } if (tp->t_pgrp == NULL) { ttyprintf(tp, "no foreground process group\n"); - /*tp->t_rocount = 0;*/ return; } PGRP_LOCK(tp->t_pgrp); if (LIST_EMPTY(&tp->t_pgrp->pg_members)) { PGRP_UNLOCK(tp->t_pgrp); ttyprintf(tp, "empty foreground process group\n"); - /*tp->t_rocount = 0;*/ return; } @@ -310,5 +308,4 @@ (long)utime.tv_sec, utime.tv_usec / 10000, (long)stime.tv_sec, stime.tv_usec / 10000, pctcpu / 100, rss); - /*tp->t_rocount = 0;*/ }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807251453.m6PErOhY091084>