Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/subr_terminal.c
Show First 20 Lines • Show All 369 Lines • ▼ Show 20 Lines | while ((olen = ttydisc_getc(tp, obuf, sizeof obuf)) > 0) { | ||||
if (!(tm->tm_flags & TF_MUTE)) { | if (!(tm->tm_flags & TF_MUTE)) { | ||||
tm->tm_flags &= ~TF_BELL; | tm->tm_flags &= ~TF_BELL; | ||||
teken_input(&tm->tm_emulator, obuf, olen); | teken_input(&tm->tm_emulator, obuf, olen); | ||||
flags |= tm->tm_flags; | flags |= tm->tm_flags; | ||||
} | } | ||||
TERMINAL_UNLOCK_TTY(tm); | TERMINAL_UNLOCK_TTY(tm); | ||||
} | } | ||||
TERMINAL_LOCK_TTY(tm); | |||||
if (!(tm->tm_flags & TF_MUTE)) | |||||
tm->tm_class->tc_done(tm); | tm->tm_class->tc_done(tm); | ||||
TERMINAL_UNLOCK_TTY(tm); | |||||
if (flags & TF_BELL) | if (flags & TF_BELL) | ||||
tm->tm_class->tc_bell(tm); | tm->tm_class->tc_bell(tm); | ||||
} | } | ||||
static int | static int | ||||
termtty_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td) | termtty_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td) | ||||
{ | { | ||||
struct terminal *tm = tty_softc(tp); | struct terminal *tm = tty_softc(tp); | ||||
▲ Show 20 Lines • Show All 153 Lines • ▼ Show 20 Lines | termcn_cnputc(struct consdev *cp, int c) | ||||
char cv = c; | char cv = c; | ||||
TERMINAL_LOCK_CONS(tm); | TERMINAL_LOCK_CONS(tm); | ||||
if (!(tm->tm_flags & TF_MUTE)) { | if (!(tm->tm_flags & TF_MUTE)) { | ||||
backup = *teken_get_curattr(&tm->tm_emulator); | backup = *teken_get_curattr(&tm->tm_emulator); | ||||
teken_set_curattr(&tm->tm_emulator, &kernel_message); | teken_set_curattr(&tm->tm_emulator, &kernel_message); | ||||
teken_input(&tm->tm_emulator, &cv, 1); | teken_input(&tm->tm_emulator, &cv, 1); | ||||
teken_set_curattr(&tm->tm_emulator, &backup); | teken_set_curattr(&tm->tm_emulator, &backup); | ||||
tm->tm_class->tc_done(tm); | |||||
} | } | ||||
TERMINAL_UNLOCK_CONS(tm); | TERMINAL_UNLOCK_CONS(tm); | ||||
tm->tm_class->tc_done(tm); | |||||
} | } | ||||
/* | /* | ||||
* Binding with the terminal emulator. | * Binding with the terminal emulator. | ||||
*/ | */ | ||||
static void | static void | ||||
termteken_bell(void *softc) | termteken_bell(void *softc) | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |