|
FreeBSD kernel kern code
|
#include <sys/cdefs.h>#include "opt_ddb.h"#include <sys/param.h>#include <sys/systm.h>#include <sys/lock.h>#include <sys/mutex.h>#include <sys/conf.h>#include <sys/cons.h>#include <sys/fcntl.h>#include <sys/kdb.h>#include <sys/kernel.h>#include <sys/malloc.h>#include <sys/msgbuf.h>#include <sys/namei.h>#include <sys/priv.h>#include <sys/proc.h>#include <sys/queue.h>#include <sys/reboot.h>#include <sys/sysctl.h>#include <sys/sbuf.h>#include <sys/tty.h>#include <sys/uio.h>#include <sys/vnode.h>#include <ddb/ddb.h>#include <machine/cpu.h>#include <machine/clock.h>
Go to the source code of this file.
Data Structures | |
| struct | cn_device |
Macros | |
| #define | CNDEVPATHMAX 32 |
| #define | CNDEVTAB_SIZE 4 |
Functions | |
| __FBSDID ("$BSDSUniX$") | |
| static | MALLOC_DEFINE (M_TTYCONS,"tty console","tty console handling") |
| static | STAILQ_HEAD (cn_device) |
| void | cninit_finish () |
| int | cnadd (struct consdev *cn) |
| void | cnremove (struct consdev *cn) |
| void | cnselect (struct consdev *cn) |
| void | cnavailable (struct consdev *cn, int available) |
| int | cnunavailable (void) |
| static int | sysctl_kern_console (SYSCTL_HANDLER_ARGS) |
| SYSCTL_PROC (_kern, OID_AUTO, console, CTLTYPE_STRING|CTLFLAG_RW, 0, 0, sysctl_kern_console,"A","Console device control") | |
| static int | sysctl_kern_consmute (SYSCTL_HANDLER_ARGS) |
| SYSCTL_PROC (_kern, OID_AUTO, consmute, CTLTYPE_INT|CTLFLAG_RW, 0, sizeof(cn_mute), sysctl_kern_consmute,"I","State of the console muting") | |
| void | cngrab () |
| void | cnungrab () |
| int | cngetc (void) |
| int | cncheckc (void) |
| void | cngets (char *cp, size_t size, int visible) |
| void | cnputc (int c) |
| void | cnputs (char *p) |
| SYSCTL_INT (_kern, OID_AUTO, consmsgbuf_size, CTLFLAG_RW,&consmsgbuf_size, 0,"Console tty buffer size") | |
| void | constty_set (struct tty *tp) |
| void | constty_clear (void) |
| SYSCTL_INT (_kern, OID_AUTO, constty_wakeups_per_second, CTLFLAG_RW,&constty_wakeups_per_second, 0,"Times per second to check for pending console tty messages") | |
| static void | constty_timeout (void *arg) |
| static void | cn_drvinit (void *unused) |
| SYSINIT (cndev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, cn_drvinit, NULL) | |
| int | sysbeep (int pitch __unused, int period __unused) |
Variables | |
| static struct cn_device | cn_devtab [CNDEVTAB_SIZE] |
| static int | consmsgbuf_size = 8192 |
| static int | constty_wakeups_per_second = 5 |
| #define CNDEVPATHMAX 32 |
Definition at line 79 of file kern_cons.c.
Referenced by sysctl_kern_console().
| #define CNDEVTAB_SIZE 4 |
Definition at line 80 of file kern_cons.c.
Referenced by cnadd(), cnavailable(), and cnremove().
| __FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
Definition at line 593 of file kern_cons.c.
References mtx_init().

| int cnadd | ( | struct consdev * | cn | ) |
Definition at line 168 of file kern_cons.c.
References cn_devtab, cnavailable(), CNDEVTAB_SIZE, printf(), and ttyconsdev_select().
Referenced by STAILQ_HEAD(), sysctl_kern_console(), and termcn_cnregister().


| void cnavailable | ( | struct consdev * | cn, |
| int | available | ||
| ) |
Definition at line 249 of file kern_cons.c.
References cn_devtab, and CNDEVTAB_SIZE.
Referenced by cnadd().

| int cncheckc | ( | void | ) |
Definition at line 394 of file kern_cons.c.
References kdb_active.
Referenced by cngetc(), and shutdown_panic().

| int cngetc | ( | void | ) |
Definition at line 380 of file kern_cons.c.
References cncheckc().
Referenced by cngets(), cnputc(), shutdown_halt(), and shutdown_panic().


| void cngets | ( | char * | cp, |
| size_t | size, | ||
| int | visible | ||
| ) |
Definition at line 414 of file kern_cons.c.
References cngetc(), cngrab(), cnputc(), cnputs(), and cnungrab().
Referenced by parse_dir_ask().


| void cngrab | ( | ) |
Definition at line 351 of file kern_cons.c.
References kdb_active.
Referenced by cngets(), cnputc(), kdb_trap(), kern_reboot(), and panic().

| void cninit_finish | ( | ) |
Definition at line 161 of file kern_cons.c.
| void cnputc | ( | int | c | ) |
Definition at line 463 of file kern_cons.c.
References cngetc(), cngrab(), cnungrab(), and kdb_active.
Referenced by cngets(), cnputs(), constty_clear(), putbuf(), and putchar().


| void cnputs | ( | char * | p | ) |
Definition at line 494 of file kern_cons.c.
References cnputc().
Referenced by _vprintf(), cngets(), and putbuf().


| void cnremove | ( | struct consdev * | cn | ) |
Definition at line 199 of file kern_cons.c.
References cn_devtab, CNDEVTAB_SIZE, and ttyconsdev_select().
Referenced by STAILQ_HEAD(), and sysctl_kern_console().


| void cnselect | ( | struct consdev * | cn | ) |
Definition at line 232 of file kern_cons.c.
References ttyconsdev_select().
Referenced by STAILQ_HEAD(), and sysctl_kern_console().


| int cnunavailable | ( | void | ) |
Definition at line 269 of file kern_cons.c.
| void cnungrab | ( | ) |
Definition at line 364 of file kern_cons.c.
References kdb_active.
Referenced by cngets(), cnputc(), and kdb_trap().

| void constty_clear | ( | void | ) |
Definition at line 545 of file kern_cons.c.
References cnputc(), free(), and msgbuf_getchar().
Referenced by constty_timeout(), tty_generic_ioctl(), and ttydev_leave().


| void constty_set | ( | struct tty * | tp | ) |
Definition at line 526 of file kern_cons.c.
References callout_init(), consmsgbuf_size, constty_timeout(), malloc(), and msgbuf_init().
Referenced by tty_generic_ioctl().


|
static |
Definition at line 566 of file kern_cons.c.
References constty_clear(), hz, msgbuf_getchar(), and tty_putchar().
Referenced by constty_set().


|
static |
|
static |
Definition at line 82 of file kern_cons.c.
References boothowto, cnadd(), cnremove(), and cnselect().

| int sysbeep | ( | int pitch | __unused, |
| int period | __unused | ||
| ) |
Definition at line 643 of file kern_cons.c.
| SYSCTL_INT | ( | _kern | , |
| OID_AUTO | , | ||
| consmsgbuf_size | , | ||
| CTLFLAG_RW | , | ||
| & | consmsgbuf_size, | ||
| 0 | , | ||
| "Console tty buffer size" | |||
| ) |
| SYSCTL_INT | ( | _kern | , |
| OID_AUTO | , | ||
| constty_wakeups_per_second | , | ||
| CTLFLAG_RW | , | ||
| & | constty_wakeups_per_second, | ||
| 0 | , | ||
| "Times per second to check for pending console tty messages" | |||
| ) |
|
static |
Definition at line 336 of file kern_cons.c.
References sysctl_handle_int().

|
static |
Definition at line 279 of file kern_cons.c.
References cnadd(), CNDEVPATHMAX, cnremove(), cnselect(), sbuf_clear(), sbuf_data(), sbuf_delete(), sbuf_finish(), sbuf_len(), sbuf_new(), sbuf_printf(), and sysctl_handle_string().

| SYSCTL_PROC | ( | _kern | , |
| OID_AUTO | , | ||
| console | , | ||
| CTLTYPE_STRING| | CTLFLAG_RW, | ||
| 0 | , | ||
| 0 | , | ||
| sysctl_kern_console | , | ||
| "A" | , | ||
| "Console device control" | |||
| ) |
| SYSCTL_PROC | ( | _kern | , |
| OID_AUTO | , | ||
| consmute | , | ||
| CTLTYPE_INT| | CTLFLAG_RW, | ||
| 0 | , | ||
| sizeof(cn_mute) | , | ||
| sysctl_kern_consmute | , | ||
| "I" | , | ||
| "State of the console muting" | |||
| ) |
| SYSINIT | ( | cndev | , |
| SI_SUB_DRIVERS | , | ||
| SI_ORDER_MIDDLE | , | ||
| cn_drvinit | , | ||
| NULL | |||
| ) |
|
static |
Definition at line 81 of file kern_cons.c.
Referenced by cnadd(), cnavailable(), and cnremove().
|
static |
Definition at line 518 of file kern_cons.c.
Referenced by constty_set().
|
static |
Definition at line 560 of file kern_cons.c.