Need more help on /etc/lddrv/wind.o
Bradley Smith
bes at holin.ATT.COM
Thu Aug 10 22:59:19 AEST 1989
Ok here is the latest.
first - the 'ld -r -o uipc.o /etc/lddrv/ifile.wind ...' didn't work
something about can't allocate address
second - catching the linesw for reads & writes didn't buy me much
other than I could verify my address.
now what I have gotten to work.
By using nlist and loading the vaules via a boot program (right now
they are hard coded) I can get at the wintty struct which is most
likely defined as 'struct tty wintty[WINNUM];' where WINNUM=12.
Further more I can look at all the tty elements.
Now the interesting stuff. First I am currently only interested in
input (so we don't block on reads, and can select on stdin). In
looking at Ditto's nkbd.c driver when it gets a char it ends up calling
(*linesw[].l_input)(tp), which from looking at /etc/master, wind
dosnot have. Also nkbd.c sticks the chars on the end tty->t_rbuf.c_ptr
and has tp->t_rbuf.c_count count down via --. This is backwards from
the pty driver. Further more c_count also is 64 (as is c_size which
is the buffer size) when I do selects and have typed chars in, ie.
I have a loop that does a select for 5 seconds, and repeats this.
The first time around I get select=0 (which it should) but then I
type chars (with out a read) and select still is 0 and all the buffer
address and counts haven't changed. Even though the nkbd.c driver has
been called (debug messages in it). Also it appears that even
if in the program there is a sleep(30); and I type chars in the wind
driver sucks them up and puts them else where and I can't seem to
find out where.
Anyone have an idea?
Note: if one was to increase the number of windows, one would have to
change wintty (ie patch wind.o so that it uses your address) and since
it is an array of structures instead of a pointer, you have to patch
actual .text segment
--
Bradley Smith
Computer Systems Offer Integration Laboratory
AT&T Bell Labs, Holmdel, NJ
201-949-0090 att!holin!bes or bes at holin.ATT.COM
More information about the Unix-pc.general
mailing list