Date: Fri, 22 Aug 2008 05:32:17 GMT From: Ed Schouten <ed@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 148083 for review Message-ID: <200808220532.m7M5WHE0090533@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=148083 Change 148083 by ed@ed_dull on 2008/08/22 05:31:39 Properly document the SNP_*_BUFSIZE definitions. Requested by: sam Affected files ... .. //depot/projects/mpsafetty/sys/dev/snp/snp.c#11 edit Differences ... ==== //depot/projects/mpsafetty/sys/dev/snp/snp.c#11 (text+ko) ==== @@ -48,8 +48,19 @@ "tty snoop registration"); static MALLOC_DEFINE(M_SNP, "snp", "tty snoop device"); -#define SNP_INPUT_BUFSIZE 16 /* For uiomove(). */ -#define SNP_OUTPUT_BUFSIZE 16384 /* For the ttyoutq. */ +/* + * There is no need to have a big input buffer. In most typical setups, + * we won't inject much data into the TTY, because users can't type + * really fast. + */ +#define SNP_INPUT_BUFSIZE 16 +/* + * The output buffer has to be really big. Right now we don't support + * any form of flow control, which means we lost any data we can't + * accept. We set the output buffer size to about twice the size of a + * pseudo-terminal/virtual console's output buffer. + */ +#define SNP_OUTPUT_BUFSIZE 16384 static d_open_t snp_open; static d_read_t snp_read;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808220532.m7M5WHE0090533>