From owner-cvs-src-old@FreeBSD.ORG Sat Nov 1 08:36:40 2008 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14EF3106564A for ; Sat, 1 Nov 2008 08:36:40 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0151B8FC18 for ; Sat, 1 Nov 2008 08:36:40 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mA18aduv004914 for ; Sat, 1 Nov 2008 08:36:39 GMT (envelope-from ed@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mA18adPZ004913 for cvs-src-old@freebsd.org; Sat, 1 Nov 2008 08:36:39 GMT (envelope-from ed@repoman.freebsd.org) Message-Id: <200811010836.mA18adPZ004913@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to ed@repoman.freebsd.org using -f From: Ed Schouten Date: Sat, 1 Nov 2008 08:35:28 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/conf files src/sys/kern kern_cons.c tty.c tty_cons.c src/sys/sys tty.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 08:36:40 -0000 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 , Carlos A.M. dos Santos , Eygene Ryabinkin 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