Hello,
I've some small questions about the struct 'clist', 'cblock' and 'tty'
/usr/src/sys/sys/tty.h says about 'clist'
/*
* Clists are character lists, which is a variable length linked list
* of cblocks, with a count of the number of characters in the list.
*/
struct clist {
int c_cc; /* Number of characters in the clist. */
int c_cbcount; /* Number of cblocks. */
int c_cbmax; /* Max # cblocks allowed for this clist. */
int c_cbreserved; /* # cblocks reserved for this clist. */
char *c_cf; /* Pointer to the first cblock. */
char *c_cl; /* Pointer to the last cblock. */
};
and about 'tty'
struct tty {
struct clist t_rawq; /* Device raw input queue. */
long t_rawcc; /* Raw input queue statistics. */
struct clist t_canq; /* Device canonical queue. */
long t_cancc; /* Canonical queue statistics. */
struct clist t_outq; /* Device output queue. */
...
}
and /usr/src/sys/sys/clist.h about 'cblock'
struct cblock {
struct cblock *c_next; /* next cblock in queue */
unsigned char c_quote[CBQSIZE]; /* quoted characters */
unsigned char c_info[CBSIZE]; /* characters */
};
In the driver it seems that tty->t_outq.c_cf is pointing to the data
bytes itself which the driver should send to the device and not to
a 'cblock' (the comment in 'clist' says *c_cf; is Pointer to the first
cblock);
is this just a small error in the comment and t_outq.c_cf is really
pointing to cblock.c_info[]?
what would be the correct way to pick up the next 'cblock' in that chain
if there is already more data to deliver when for example
tty->t_outq.c_cc says 810 bytes? picking up the 4 byte pointer at
t_outq.c_cf - 20?
thanks in advance for some clarification
matthias
--
Matthias Apitz
http://www.UnixArea.de/
_______________________________________________
freebsd-drivers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-drivers
To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org"
| Ryan Hope | reiser4 for 2.6.27-rc1 |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| majkls | sys_chroot+sys_fchdir Fix |
| Chuck Ebbert | Why do so many machines need "noapic"? |
git: | |
| Junio C Hamano | Re: [PATCH] Teach remote machinery about remotes.default config variable |
| Kyle Moffett | Using GIT to store /etc (Or: How to make GIT store all file permission bits) |
| Alan Chandler | Question around git-shell usage in Everyday Git |
| Jakub Narebski | Re: VCS comparison table |
| Richard Stallman | Real men don't attack straw men |
| Sunnz | How do I configure sendmail? |
| Edd Barrett | Re: Cold Boot Attacks on Encryption Keys |
| Jussi Peltola | Re: Remote Admin Card - Dell DRAC or HP ILO2 ? |
| Stephen Pierce | SLS |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Les Andrzejewski | X386/WD90C31/SUMSUNG SYNC MASTER 4 |
| Dave `geek' Gymer | WARNING (was Re: New afio release) |
