Date: Sat, 30 Aug 2008 09:18:27 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern tty.c tty_inq.c tty_outq.c src/sys/sys ttyqueue.h Message-ID: <200808300919.m7U9JeUC004098@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
ed 2008-08-30 09:18:27 UTC FreeBSD src repository Modified files: sys/kern tty.c tty_inq.c tty_outq.c sys/sys ttyqueue.h Log: 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 normal cases. - 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808300919.m7U9JeUC004098>