Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/tty_info.c
Show First 20 Lines • Show All 289 Lines • ▼ Show 20 Lines | #endif | ||||
const char *stateprefix, *state; | const char *stateprefix, *state; | ||||
struct sbuf sb; | struct sbuf sb; | ||||
long rss; | long rss; | ||||
int load, pctcpu; | int load, pctcpu; | ||||
pid_t pid; | pid_t pid; | ||||
char comm[MAXCOMLEN + 1]; | char comm[MAXCOMLEN + 1]; | ||||
struct rusage ru; | struct rusage ru; | ||||
tty_assert_locked(tp); | /* ttydisc lock is sufficient for everything we're doing here */ | ||||
ttydisc_assert_locked(tp); | |||||
if (tty_checkoutq(tp) == 0) | if (tty_checkoutq(tp) == 0) | ||||
return; | return; | ||||
(void)sbuf_new(&sb, tp->t_prbuf, tp->t_prbufsz, SBUF_FIXEDLEN); | (void)sbuf_new(&sb, tp->t_prbuf, tp->t_prbufsz, SBUF_FIXEDLEN); | ||||
sbuf_set_drain(&sb, sbuf_tty_drain, tp); | sbuf_set_drain(&sb, sbuf_tty_drain, tp); | ||||
/* Print load average. */ | /* Print load average. */ | ||||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |