Ed Schouten
c9dba40cc8
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>
2008-11-01 08:35:28 +00:00
..
2008-03-20 21:24:32 +00:00
2008-01-18 17:02:14 +00:00
2008-09-24 10:14:37 +00:00
2008-10-08 11:11:36 +00:00
2008-01-13 14:44:15 +00:00
2008-08-28 15:23:18 +00:00
2008-10-28 11:33:06 +00:00
2008-09-25 20:08:36 +00:00
2008-08-21 15:02:17 +00:00
2008-07-02 20:44:33 +00:00
2008-04-02 11:20:30 +00:00
2008-09-25 13:42:19 +00:00
2008-09-27 13:19:09 +00:00
2008-11-01 08:35:28 +00:00
2008-05-05 19:13:52 +00:00
2008-07-07 21:32:02 +00:00
2008-05-23 03:04:27 +00:00
2008-10-23 20:26:15 +00:00
2008-06-16 04:44:29 +00:00
2008-07-21 15:05:25 +00:00
2008-10-23 20:26:15 +00:00
2008-09-10 13:16:41 +00:00
2008-10-15 06:31:37 +00:00
2008-10-19 01:35:27 +00:00
2008-03-16 10:58:09 +00:00
2008-09-23 14:25:56 +00:00
2008-10-23 15:53:51 +00:00
2008-08-03 21:07:19 +00:00
2008-02-23 01:01:49 +00:00
2008-10-23 20:26:15 +00:00
2008-09-10 19:13:30 +00:00
2008-10-24 16:04:10 +00:00
2008-07-05 19:34:33 +00:00
2008-04-04 18:41:12 +00:00
2008-10-02 15:37:58 +00:00
2008-03-16 10:58:09 +00:00
2008-10-23 20:26:15 +00:00
2008-09-10 19:13:30 +00:00
2008-03-16 10:58:09 +00:00
2008-09-22 10:37:02 +00:00
2008-08-17 23:27:27 +00:00
2008-09-17 15:49:44 +00:00
2008-10-31 05:43:19 +00:00
2008-10-23 15:53:51 +00:00
2008-10-24 01:09:24 +00:00
2008-09-10 19:13:30 +00:00
2008-09-10 19:13:30 +00:00
2008-05-18 19:32:36 +00:00
2008-10-01 22:08:53 +00:00
2008-10-23 07:55:38 +00:00
2008-08-28 19:34:58 +00:00
2008-05-12 06:42:06 +00:00
2008-09-10 19:13:30 +00:00
2008-10-19 01:35:27 +00:00
2008-09-18 20:10:11 +00:00
2007-11-30 21:29:08 +00:00
2008-03-16 10:58:09 +00:00
2008-10-29 12:11:48 +00:00
2008-10-23 07:55:38 +00:00
2008-10-20 02:37:53 +00:00
2008-10-28 03:26:25 +00:00
2008-06-24 07:32:12 +00:00
2008-10-02 15:37:58 +00:00
2008-10-02 15:37:58 +00:00
2008-08-03 13:33:45 +00:00
2008-08-03 13:33:45 +00:00
2008-05-23 04:06:49 +00:00
2008-05-25 22:11:40 +00:00
2007-12-14 21:30:51 +00:00
2008-09-25 20:07:42 +00:00
2008-03-12 10:12:01 +00:00
2008-07-28 20:39:21 +00:00
2008-10-29 13:36:23 +00:00
2008-06-26 07:52:45 +00:00
2008-10-28 21:58:48 +00:00
2008-07-21 20:50:49 +00:00
2008-10-23 15:53:51 +00:00
2008-10-10 17:49:47 +00:00
2008-09-21 18:12:18 +00:00
2008-04-22 19:38:30 +00:00
2008-03-16 10:58:09 +00:00
2008-10-04 23:58:02 +00:00
2008-05-04 23:29:38 +00:00
2008-07-27 21:45:20 +00:00
2008-03-16 10:58:09 +00:00
2008-03-25 09:39:02 +00:00
2008-10-27 08:09:05 +00:00
2008-09-15 22:45:14 +00:00
2008-08-20 08:31:58 +00:00
2008-03-16 10:58:09 +00:00
2008-10-22 18:20:45 +00:00
2008-04-22 19:38:30 +00:00
2008-08-09 10:26:21 +00:00
2008-10-24 01:03:31 +00:00
2008-08-27 18:23:55 +00:00
2008-10-30 21:48:28 +00:00
2008-07-18 07:10:33 +00:00
2008-10-19 01:35:27 +00:00
2008-09-15 22:45:14 +00:00
2008-10-23 20:26:15 +00:00
2008-09-23 14:25:38 +00:00
2008-05-23 11:14:03 +00:00
2008-10-23 07:55:38 +00:00
2008-10-07 07:10:28 +00:00
2008-09-25 20:08:36 +00:00
2008-09-25 20:07:42 +00:00
2008-09-25 20:08:36 +00:00
2007-10-24 19:04:04 +00:00
2008-06-19 18:08:42 +00:00
2008-02-12 20:55:03 +00:00
2008-09-04 16:30:53 +00:00
2008-08-20 08:31:58 +00:00
2008-08-30 09:18:27 +00:00
2008-08-30 09:18:27 +00:00
2008-09-23 17:12:25 +00:00
2008-08-23 16:03:00 +00:00
2008-06-03 12:38:00 +00:00
2008-09-22 19:25:14 +00:00
2008-11-01 08:35:28 +00:00
2008-10-23 15:53:51 +00:00
2008-02-01 19:36:27 +00:00
2008-07-03 08:35:59 +00:00
2008-03-16 10:58:09 +00:00
2007-10-24 19:04:04 +00:00
2008-09-05 04:05:31 +00:00
2008-10-28 13:44:11 +00:00
2008-06-27 05:39:04 +00:00
2008-10-28 13:44:11 +00:00
2008-10-07 09:51:39 +00:00
2008-10-17 01:25:45 +00:00
2008-10-23 15:53:51 +00:00
2008-10-23 15:53:51 +00:00
2008-03-31 12:01:21 +00:00
2008-06-21 11:34:34 +00:00
2008-10-10 21:23:50 +00:00
2008-09-24 18:51:33 +00:00
2008-03-22 09:15:16 +00:00
2008-08-28 15:23:18 +00:00
2008-10-23 15:53:51 +00:00
2008-03-31 12:01:21 +00:00
2008-03-16 10:58:09 +00:00
2008-10-01 19:25:37 +00:00
2008-10-10 21:23:50 +00:00
2008-10-28 13:44:11 +00:00
2008-10-28 13:44:11 +00:00
2008-10-28 13:44:11 +00:00
2008-10-28 13:44:11 +00:00