Date: Sat, 1 Nov 2008 08:35:28 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/conf files src/sys/kern kern_cons.c tty.c tty_cons.c src/sys/sys tty.h Message-ID: <200811010836.mA18adPZ004913@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
ed 2008-11-01 08:35:28 UTC FreeBSD src repository Modified files: sys/conf files sys/kern tty.c sys/sys tty.h Added files: sys/kern kern_cons.c Removed files: sys/kern tty_cons.c Log: SVN rev 184521 on 2008-11-01 08:35:28Z by ed 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> Revision Changes Path 1.1344 +1 -1 src/sys/conf/files 1.1 +566 -0 src/sys/kern/kern_cons.c (new) 1.296 +87 -9 src/sys/kern/tty.c 1.146 +0 -796 src/sys/kern/tty_cons.c (dead) 1.111 +3 -0 src/sys/sys/tty.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811010836.mA18adPZ004913>