Subject: Re: CVS commit: syssrc
To: None <itojun@iijlab.net>
From: enami tsugutomo <enami@sm.sony.co.jp>
List: source-changes
Date: 11/21/2000 12:27:41
itojun@iijlab.net writes:

> >This means old code
> >		if (tp->t_line)
> >			(*linesw[tp->t_line].l_start)(tp);
		else
			sccstart(tp);
> >is now changed to
> >		if (tp->t_linesw)
> >			(*tp->t_linesw->l_start)(tp);
		else
			sccstart(tp);
> >but old tp->t_line was initialize to 0 in ttymalloc() and now
> >new tp->t_linesw is initialized to linesw[0], which is declared
> >in tty_conf.c. (i.e. it is not NULL.)
> >I'm not sure about the new line discipline scheme, but
> >shouldn't we check if tp->t_linesw is equal with linesw[0] or not?
> 
> 	i'm not sure why the old behavior does not call l_start if
> 	tp->t_line == 0 (meaning "termios" line discipline).  why we don't
> 	call l_start for termios case?  i'm also not a guru here.

So, it just calles sccstart directly if the line discipline is
termios.  Slight optimization (this is inside interrupt handler) or
just histrical reason?

Anyway, I guess testing t_linesw agains NULL doesn't make sense.
Instead, we should either test against termios line discipline or just
call l_start directly always.

enami.