FreeBSD kernel kern code
tty_info.c File Reference
#include <sys/cdefs.h>
#include <sys/param.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>
#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 ("$BSDSUniX$")
 
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)
 
void tty_info (struct tty *tp)
 

Macro Definition Documentation

#define BOTH   3

Definition at line 76 of file tty_info.c.

Referenced by proc_compare(), and thread_compare().

#define ONLYA   2

Definition at line 74 of file tty_info.c.

Referenced by proc_compare(), and thread_compare().

#define ONLYB   1

Definition at line 75 of file tty_info.c.

Referenced by proc_compare(), and thread_compare().

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

Definition at line 73 of file tty_info.c.

Referenced by proc_compare(), and thread_compare().

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
static int proc_compare ( struct proc *  p1,
struct proc *  p2 
)
static

Definition at line 157 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:

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

Definition at line 79 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:

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

Definition at line 101 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:

void tty_info ( struct tty *  tp)

Definition at line 214 of file tty_info.c.

References averunnable, microuptime(), proc_compare(), rufetchcalc(), sched_pctcpu(), thread_compare(), timevalsub(), tty_checkoutq(), and ttyprintf().

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: