FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/cons.h>
#include <sys/consio.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/systm.h>
#include <sys/terminal.h>
#include <sys/tty.h>
#include <machine/stdarg.h>
Go to the source code of this file.
Macros | |
#define | TERMINAL_LOCK(tm) |
#define | TERMINAL_UNLOCK(tm) |
#define | TERMINAL_LOCK_TTY(tm) |
#define | TERMINAL_UNLOCK_TTY(tm) |
#define | TERMINAL_LOCK_CONS(tm) mtx_lock_spin(&(tm)->tm_mtx) |
#define | TERMINAL_UNLOCK_CONS(tm) mtx_unlock_spin(&(tm)->tm_mtx) |
#define | TCHAR_CREATE(c, a) |
Functions | |
__FBSDID ("$BSDSUniX$") | |
static | MALLOC_DEFINE (M_TERMINAL,"terminal","terminal device") |
static void | terminal_init (struct terminal *tm) |
struct terminal * | terminal_alloc (const struct terminal_class *tc, void *softc) |
static void | terminal_sync_ttysize (struct terminal *tm) |
void | terminal_maketty (struct terminal *tm, const char *fmt,...) |
void | terminal_set_winsize_blank (struct terminal *tm, const struct winsize *size, int blank) |
void | terminal_set_winsize (struct terminal *tm, const struct winsize *size) |
void | terminal_mute (struct terminal *tm, int yes) |
void | terminal_input_char (struct terminal *tm, term_char_t c) |
void | terminal_input_raw (struct terminal *tm, char c) |
void | terminal_input_special (struct terminal *tm, unsigned int k) |
static int | termtty_open (struct tty *tp) |
static void | termtty_close (struct tty *tp) |
static void | termtty_outwakeup (struct tty *tp) |
static int | termtty_ioctl (struct tty *tp, u_long cmd, caddr_t data, struct thread *td) |
static int | termtty_mmap (struct tty *tp, vm_ooffset_t offset, vm_paddr_t *paddr, int nprot, vm_memattr_t *memattr) |
void | termcn_cnregister (struct terminal *tm) |
static void | termcn_cngrab (struct consdev *cp) |
static void | termcn_cnungrab (struct consdev *cp) |
static void | termcn_cnprobe (struct consdev *cp) |
static void | termcn_cninit (struct consdev *cp) |
static void | termcn_cnterm (struct consdev *cp) |
static int | termcn_cngetc (struct consdev *cp) |
static void | termcn_cnputc (struct consdev *cp, int c) |
static void | termteken_bell (void *softc) |
static void | termteken_cursor (void *softc, const teken_pos_t *p) |
static void | termteken_putchar (void *softc, const teken_pos_t *p, teken_char_t c, const teken_attr_t *a) |
static void | termteken_fill (void *softc, const teken_rect_t *r, teken_char_t c, const teken_attr_t *a) |
static void | termteken_copy (void *softc, const teken_rect_t *r, const teken_pos_t *p) |
static void | termteken_param (void *softc, int cmd, unsigned int arg) |
static void | termteken_respond (void *softc, const void *buf, size_t len) |
Variables | |
static tsw_open_t | termtty_open |
static tsw_close_t | termtty_close |
static tsw_outwakeup_t | termtty_outwakeup |
static tsw_ioctl_t | termtty_ioctl |
static tsw_mmap_t | termtty_mmap |
static struct ttydevsw | terminal_tty_class |
static tf_bell_t | termteken_bell |
static tf_cursor_t | termteken_cursor |
static tf_putchar_t | termteken_putchar |
static tf_fill_t | termteken_fill |
static tf_copy_t | termteken_copy |
static tf_param_t | termteken_param |
static tf_respond_t | termteken_respond |
static teken_funcs_t | terminal_drawmethods |
static const teken_attr_t | kernel_message |
static const teken_attr_t | default_message |
static cn_probe_t | termcn_cnprobe |
static cn_init_t | termcn_cninit |
static cn_term_t | termcn_cnterm |
static cn_getc_t | termcn_cngetc |
static cn_putc_t | termcn_cnputc |
static cn_grab_t | termcn_cngrab |
static cn_ungrab_t | termcn_cnungrab |
const struct consdev_ops | termcn_cnops |
#define TCHAR_CREATE | ( | c, | |
a | |||
) |
Definition at line 132 of file subr_terminal.c.
Referenced by terminal_set_winsize_blank(), termteken_fill(), and termteken_putchar().
#define TERMINAL_LOCK | ( | tm | ) |
Definition at line 57 of file subr_terminal.c.
Referenced by terminal_mute(), and terminal_set_winsize_blank().
#define TERMINAL_LOCK_CONS | ( | tm | ) | mtx_lock_spin(&(tm)->tm_mtx) |
Definition at line 77 of file subr_terminal.c.
Referenced by termcn_cnputc().
#define TERMINAL_LOCK_TTY | ( | tm | ) |
Definition at line 69 of file subr_terminal.c.
Referenced by termtty_outwakeup().
#define TERMINAL_UNLOCK | ( | tm | ) |
Definition at line 63 of file subr_terminal.c.
Referenced by terminal_mute(), and terminal_set_winsize_blank().
#define TERMINAL_UNLOCK_CONS | ( | tm | ) | mtx_unlock_spin(&(tm)->tm_mtx) |
Definition at line 78 of file subr_terminal.c.
Referenced by termcn_cnputc().
#define TERMINAL_UNLOCK_TTY | ( | tm | ) |
Definition at line 73 of file subr_terminal.c.
Referenced by termtty_outwakeup().
__FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
|
static |
Definition at line 516 of file subr_terminal.c.
|
static |
Definition at line 476 of file subr_terminal.c.
|
static |
Definition at line 504 of file subr_terminal.c.
|
static |
Definition at line 488 of file subr_terminal.c.
References terminal_init().
|
static |
Definition at line 524 of file subr_terminal.c.
References kernel_message, TERMINAL_LOCK_CONS, and TERMINAL_UNLOCK_CONS.
void termcn_cnregister | ( | struct terminal * | tm | ) |
Definition at line 452 of file subr_terminal.c.
References cnadd(), malloc(), sprintf(), termcn_cnops, and terminal_init().
|
static |
Definition at line 510 of file subr_terminal.c.
|
static |
Definition at line 482 of file subr_terminal.c.
struct terminal* terminal_alloc | ( | const struct terminal_class * | tc, |
void * | softc | ||
) |
Definition at line 148 of file subr_terminal.c.
References malloc(), and terminal_init().
|
static |
Definition at line 138 of file subr_terminal.c.
References default_message, mtx_init(), and terminal_drawmethods.
Referenced by termcn_cnprobe(), termcn_cnregister(), and terminal_alloc().
void terminal_input_char | ( | struct terminal * | tm, |
term_char_t | c | ||
) |
Definition at line 244 of file subr_terminal.c.
References ttydisc_rint(), ttydisc_rint_done(), and ttydisc_rint_simple().
void terminal_input_raw | ( | struct terminal * | tm, |
char | c | ||
) |
Definition at line 297 of file subr_terminal.c.
References ttydisc_rint(), and ttydisc_rint_done().
void terminal_input_special | ( | struct terminal * | tm, |
unsigned int | k | ||
) |
Definition at line 312 of file subr_terminal.c.
References ttydisc_rint_done(), and ttydisc_rint_simple().
void terminal_maketty | ( | struct terminal * | tm, |
const char * | fmt, | ||
... | |||
) |
Definition at line 176 of file subr_terminal.c.
References name, terminal_sync_ttysize(), terminal_tty_class, tty_alloc(), tty_makedev(), and vsnrprintf().
void terminal_mute | ( | struct terminal * | tm, |
int | yes | ||
) |
Definition at line 232 of file subr_terminal.c.
References TERMINAL_LOCK, and TERMINAL_UNLOCK.
void terminal_set_winsize | ( | struct terminal * | tm, |
const struct winsize * | size | ||
) |
Definition at line 219 of file subr_terminal.c.
References terminal_set_winsize_blank().
void terminal_set_winsize_blank | ( | struct terminal * | tm, |
const struct winsize * | size, | ||
int | blank | ||
) |
Definition at line 193 of file subr_terminal.c.
References default_message, TCHAR_CREATE, TERMINAL_LOCK, terminal_sync_ttysize(), and TERMINAL_UNLOCK.
Referenced by terminal_set_winsize().
|
static |
Definition at line 162 of file subr_terminal.c.
References tty_set_winsize().
Referenced by terminal_maketty(), and terminal_set_winsize_blank().
|
static |
Definition at line 547 of file subr_terminal.c.
|
static |
Definition at line 581 of file subr_terminal.c.
|
static |
Definition at line 555 of file subr_terminal.c.
|
static |
Definition at line 572 of file subr_terminal.c.
References TCHAR_CREATE.
|
static |
Definition at line 589 of file subr_terminal.c.
|
static |
Definition at line 563 of file subr_terminal.c.
References TCHAR_CREATE.
|
static |
Definition at line 597 of file subr_terminal.c.
References ttydisc_rint_done(), and ttydisc_rint_simple().
|
static |
Definition at line 345 of file subr_terminal.c.
|
static |
Definition at line 376 of file subr_terminal.c.
|
static |
Definition at line 421 of file subr_terminal.c.
|
static |
Definition at line 336 of file subr_terminal.c.
|
static |
Definition at line 353 of file subr_terminal.c.
References TERMINAL_LOCK_TTY, TERMINAL_UNLOCK_TTY, and ttydisc_getc().
|
static |
Definition at line 127 of file subr_terminal.c.
Referenced by terminal_init(), and terminal_set_winsize_blank().
|
static |
Definition at line 121 of file subr_terminal.c.
Referenced by termcn_cnputc().
|
static |
Definition at line 436 of file subr_terminal.c.
|
static |
Definition at line 438 of file subr_terminal.c.
|
static |
Definition at line 434 of file subr_terminal.c.
const struct consdev_ops termcn_cnops |
Definition at line 441 of file subr_terminal.c.
Referenced by termcn_cnregister().
|
static |
Definition at line 433 of file subr_terminal.c.
|
static |
Definition at line 437 of file subr_terminal.c.
|
static |
Definition at line 435 of file subr_terminal.c.
|
static |
Definition at line 439 of file subr_terminal.c.
|
static |
Definition at line 110 of file subr_terminal.c.
Referenced by terminal_init().
|
static |
Definition at line 90 of file subr_terminal.c.
Referenced by terminal_maketty().
|
static |
Definition at line 102 of file subr_terminal.c.
|
static |
Definition at line 106 of file subr_terminal.c.
|
static |
Definition at line 103 of file subr_terminal.c.
|
static |
Definition at line 105 of file subr_terminal.c.
|
static |
Definition at line 107 of file subr_terminal.c.
|
static |
Definition at line 104 of file subr_terminal.c.
|
static |
Definition at line 108 of file subr_terminal.c.
|
static |
Definition at line 85 of file subr_terminal.c.
|
static |
Definition at line 87 of file subr_terminal.c.
|
static |
Definition at line 88 of file subr_terminal.c.
|
static |
Definition at line 84 of file subr_terminal.c.
|
static |
Definition at line 86 of file subr_terminal.c.