Help with line disciplines
Steve Nuchia
steve at nuchat.UUCP
Mon Apr 17 15:22:22 AEST 1989
In article <763 at dms.UUCP> shepperd at dms.UUCP (Dave Shepperd) writes:
>What does the kernel expect the line discipline routines to do EXACTLY?
>I mean what bits in what structures does it want twiddled and, more
>importantly, what bits does it want left alone? I'm concerned the most
This is not documented in any obvious place, and as far as I know
isn't *documented* anywhere. It can be deduced within the limits
of the correctness of the examples by examining existing drivers
and LD code, if you have access and choose to use it.
>about the l_open, l_close and the l_ioctl functions. I have made
>assumptions about what the others do and apparently guessed right
>because the editor works. This question may be best answered by suggesting
>a book on the subject.
If you find one PLEASE let me know. I have every book that even
mentions Unix driver writing, and LD interfacing is never covered
in any kind of detail. I've had to do pretty much the same
reverse-engineering job you did for my 286/386 serial driver.
>Is it always correct for the l_open and l_ioctl routines to assume the
>u structure has meaningful data in it (or that it is even accessible)?
Yes. The u area is nailed down and correct for anything that
isn't called at interrupt time. Unless something in streams
breaks this? I haven't played with stream from the inside yet.
>How does a driver, given the process group number, access the list of
>processes belonging to that group? (ps does it somehow). I believe I will
>need to access this list at interrupt time.
The only thing you can do to the process group is send a signal
to all members; the signal routine has a loop over the process
table that tickles every process that matches. If you want
to do something else (what? sounds dangerous) you need to
loop similarly.
--
Steve Nuchia South Coast Computing Services
uunet!nuchat!steve POB 890952 Houston, Texas 77289
(713) 964 2462 Consultation & Systems, Support for PD Software.
More information about the Comp.unix.wizards
mailing list