summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2008-11-01 08:35:28 +0000
committered <ed@FreeBSD.org>2008-11-01 08:35:28 +0000
commitc2c324d37976496417e7195d8daae3975be8eaa1 (patch)
tree92b387a3b5878c3317cf997130d7bc5769e5f6e5 /sys/conf
parentec4658731c7b03d16de04acf5f20aa4dc53635cb (diff)
downloadFreeBSD-src-c2c324d37976496417e7195d8daae3975be8eaa1.zip
FreeBSD-src-c2c324d37976496417e7195d8daae3975be8eaa1.tar.gz
Reimplement the /dev/console device node.
One of the pieces of code that I had left alone during the development of the MPSAFE TTY layer, was tty_cons.c. This file actually has two different functions: - It contains low-level console input/output routines (cnputc(), etc). - It creates /dev/console and wraps all its cdevsw calls to the appropriate TTY. This commit reimplements the second set of functions by moving it directly into the TTY layer. /dev/console is now a character device node that's basically a regular TTY, but does a lookup of `si_drv1' each time you open it. d_write has also been changed to call log_console(). d_close() is not present, because we must make sure we don't revoke the TTY after writing a log message to it. Even though I'm not convinced this is in line with the future directions of our console code, it is a good move for now. It removes recursive locking from the top half of the TTY layer. The previous implementation called into the TTY layer with Giant held. I'm renaming tty_cons.c to kern_cons.c now. The code hardly contains any TTY related bits, so we'd better give it a less misleading name. Tested by: Andrzej Tobola <ato iem pw edu pl>, Carlos A.M. dos Santos <unixmania gmail com>, Eygene Ryabinkin <rea-fbsd codelabs ru>
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/files2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/conf/files b/sys/conf/files
index fba04aa..ad5a19a 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1596,6 +1596,7 @@ kern/kern_alq.c optional alq
kern/kern_clock.c standard
kern/kern_condvar.c standard
kern/kern_conf.c standard
+kern/kern_cons.c standard
kern/kern_cpu.c standard
kern/kern_cpuset.c standard
kern/kern_context.c standard
@@ -1708,7 +1709,6 @@ kern/sysv_sem.c optional sysvsem
kern/sysv_shm.c optional sysvshm
kern/tty.c standard
kern/tty_compat.c optional compat_43tty
-kern/tty_cons.c standard
kern/tty_info.c standard
kern/tty_inq.c standard
kern/tty_outq.c standard
OpenPOWER on IntegriCloud