Subject: Question about line discipline linesw struct
To: None <tech-kern@netbsd.org>
From: J Sevy <jsevy@cs.drexel.edu>
List: tech-kern
Date: 01/01/2007 21:05:39
I've been working on a new ARM port, and developed a serial driver for
this platform, basing much of the code on existing ARM port serial
drivers, most of which seem to have borrowed code from the dev/ic/com.c
serial driver. In trying to understand better exactly what's going on in
the interaction between the serial driver and tty layer, I came across a
test that checks to see if the return value from the line discipline's
l_rint( ) function equals -1. Comments in the serial driver suggest that
this condition indicates that "the line discipline's buffer is out of
space." However, the standard termios line discipline's l_rint( )
function is statically initialized to the ttyinput( ) function, and it
looks like ttyinput( ) always returns 0. I know it's possible for an
alternative line discipline to be used, and perhaps that could return a
non-zero value, but I guess my main question is:
--> are the required semantics of the functions in the line discipline
linesw struct documented somewhere?
Particularly, the return value meanings?
Thanks,
\
Jon
--
___________________________________________
Jonathan Sevy
Geometric and Intelligent Computing Lab
Drexel University
http://gicl.cs.drexel.edu/sevy
___________________________________________