cvs commit: src/sys/kern tty.c tty_inq.c tty_outq.c src/sys/sys
ed at FreeBSD.org
Sat Aug 30 09:19:40 UTC 2008
ed 2008-08-30 09:18:27 UTC
FreeBSD src repository
sys/kern tty.c tty_inq.c tty_outq.c
SVN rev 182471 on 2008-08-30 09:18:27Z by ed
Fix some edge cases in the TTY queues:
- In the current design, when a TTY decreases its baud rate, it tries to
shrink the queues. This may not always be possible, because it will
not free any blocks that are still filled with data.
Change the TTY queues to store a `quota' value as well, which means it
will not free any blocks when changing the baud rate, but when placing
blocks back into the queue. When the amount of blocks exceeds the
quota, they get freed.
It also fixes some edge cases, where TIOCSETA during read()/
write()-calls could actually make the queue a tiny bit bigger than in
- Don't leak blocks of memory when calling TIOCSETA when the device
driver abandons the TTY while allocating memory.
- Create ttyoutq_init() and ttyinq_init() to initialize the queues,
instead of initializing them by hand. The new TTY snoop driver also
creates an outq, so it's good to have a proper interface to do this.
Obtained from: //depot/projects/mpsafetty/...
Revision Changes Path
1.286 +10 -22 src/sys/kern/tty.c
1.2 +23 -42 src/sys/kern/tty_inq.c
1.3 +29 -42 src/sys/kern/tty_outq.c
1.2 +18 -0 src/sys/sys/ttyqueue.h
More information about the cvs-all