FreeBSD kernel kern code
tty_info.c File Reference
#include <sys/cdefs.h>
#include "opt_stack.h"
#include <sys/param.h>
#include <sys/cons.h>
#include <sys/kdb.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/sbuf.h>
#include <sys/sched.h>
#include <sys/stack.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
#include <sys/tty.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
Include dependency graph for tty_info.c:

Go to the source code of this file.

Macros

#define TESTAB(a, b)   ((a)<<1 | (b))
 
#define ONLYA   2
 
#define ONLYB   1
 
#define BOTH   3
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int proc_sum (struct proc *p, fixpt_t *estcpup)
 
static int thread_compare (struct thread *td, struct thread *td2)
 
static int proc_compare (struct proc *p1, struct proc *p2)
 
static int sbuf_tty_drain (void *a, const char *d, int len)
 
void tty_info (struct tty *tp)
 

Macro Definition Documentation

◆ BOTH

#define BOTH   3

Definition at line 86 of file tty_info.c.

◆ ONLYA

#define ONLYA   2

Definition at line 84 of file tty_info.c.

◆ ONLYB

#define ONLYB   1

Definition at line 85 of file tty_info.c.

◆ TESTAB

#define TESTAB (   a,
 
)    ((a)<<1 | (b))

Definition at line 83 of file tty_info.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ proc_compare()

static int proc_compare ( struct proc *  p1,
struct proc *  p2 
)
static

Definition at line 167 of file tty_info.c.

References BOTH, ONLYA, ONLYB, proc_sum(), and TESTAB.

Referenced by tty_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ proc_sum()

static int proc_sum ( struct proc *  p,
fixpt_t *  estcpup 
)
static

Definition at line 89 of file tty_info.c.

References sched_pctcpu().

Referenced by proc_compare().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sbuf_tty_drain()

static int sbuf_tty_drain ( void *  a,
const char *  d,
int  len 
)
static

Definition at line 221 of file tty_info.c.

References cnputsn(), kdb_active, and tty_putstrn().

Referenced by tty_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_compare()

static int thread_compare ( struct thread *  td,
struct thread *  td2 
)
static

Definition at line 111 of file tty_info.c.

References BOTH, ONLYA, ONLYB, sched_pctcpu(), and TESTAB.

Referenced by tty_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tty_info()

void tty_info ( struct tty *  tp)

Definition at line 278 of file tty_info.c.

References averunnable, microuptime(), proc_compare(), rufetchcalc(), sbuf_delete(), sbuf_finish(), sbuf_new(), sbuf_printf(), sbuf_set_drain(), sbuf_tty_drain(), sched_pctcpu(), stack_sbuf_print_flags(), thread_compare(), timevalsub(), and tty_checkoutq().

Referenced by tty_generic_ioctl(), and tty_signal_pgrp().

Here is the call graph for this function:
Here is the caller graph for this function: