lkml.org 
[lkml]   [2003]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: struct tty_driver
On Tue, Feb 11, 2003 at 03:44:07PM +0100, Andries.Brouwer@cwi.nl wrote:
> Ted, I wondered:
>
> Looking at 2.5.60 I see
>
> struct tty_struct {
> int magic;
> struct tty_driver driver;
> ...
>
> and it looks like this struct tty_driver is never modified.
> Since it is rather large, why not replace it by
> struct tty_driver *driver;
> ?
>
> As it is now, the initialization in init_dev() does
> tty->driver = *driver;
> just duplicating constant data.
>
> Is this a historical relict, or does this duplication have a function?

Nope. The tty->ldisc should also be made into a pointer as well.
It's a historic relict; it's been a very, very long time since there's
been any variable data in the driver or ldisc structures.

- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.025 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site