-> + if ( test_bit(TTY_NO_WRITE_SPLIT, &tty->flags) )
Why playing with flags here ?...
if (!count%8192)
/*process one frame UNINTERRUPTIBLE*/
-> + written = write(tty, file, buf, count);
/*Check 'written' here not below ....
that's one test non 8K condition won't race. */
-> + else {
-> + for (;;) {
-> + unsigned long size = PAGE_SIZE*2;
-> + if (size > count)
-> + size = count;
-> + ret = write(tty, file, buf, size);
-> + if (ret <= 0)
-> + break;
-> + written += ret;
-> + buf += ret;
-> + count -= ret;
-> + if (!count)
-> + break;
-> + ret = -ERESTARTSYS;
-> + if (signal_pending(current))
-> + break;
-> + if (current->need_resched)
-> + schedule();
-> + }
-> }
-> if (written) {
-> file->f_dentry->d_inode->i_mtime = CURRENT_TIME;
-> diff -Naur linux-2.2.11/include/linux/tty.h
-> linux-2.2.11-mg/include/linux/tty.h
-> --- linux-2.2.11/include/linux/tty.h Mon Aug 23 14:52:57 1999
-> +++ linux-2.2.11-mg/include/linux/tty.h Mon Aug 23 15:34:43 1999
-> @@ -328,6 +328,7 @@
-> #define TTY_HW_COOK_OUT 14
-> #define TTY_HW_COOK_IN 15
-> #define TTY_PTY_LOCK 16
-> +#define TTY_NO_WRITE_SPLIT 17
->
-> #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))
->
->
-> Paul Fulghum paulkf@microgate.com
-> Microgate Corporation www.microgate.com
-> 9501 Capital of Texas Hwy
-> Austin, Texas 78759
-> (512)-345-7791
->
->
-> -
-> To unsubscribe from this list: send the line "unsubscribe
-> linux-kernel" in
-> the body of a message to majordomo@vger.rutgers.edu
-> Please read the FAQ at http://www.tux.org/lkml/
->
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/