Re: tty's use of file_list_lock and file_move

From: Alan Cox
Date: Wed Jul 12 2006 - 07:17:21 EST


Ar Maw, 2006-07-11 am 19:50 -0400, ysgrifennodd Jon Smirl:
> My original goal was to do some work on the VT layer but I got sucked
> into the TTY code because of VT/TTY interactions. I think I understand
> enough now that I can make changes in the VT code without breaking
> everything. I also see now that the VT code wasn't as closely
> intertwined into the TTY code as much as I initially thought it was.

VT is just an instance of a tty driver, at least from the tty layer
viewpoint.

> This may also explain why the init functions are all chained together.
> tty_init() -> vty_init() -> vcs_init(), kbd_init(), prom_con_init(),
> etc... Since the link order is wrong the chained init functions are
> compensating.

Its a bit more fundamental than that, there are various video side init
functions that are done before the module_init calls are made. The VT is
both a tty driver and a console.

The only real "magic" hooks in there are the resize one and the ioctl
hook. The resize one could easily be moved to be a tty driver method
that is usually NULL and would be a nice cleanup.

Alan

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