summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pstat
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 /usr.sbin/pstat
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 'usr.sbin/pstat')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud