diff options
author | andreas_kupries <akupries@shaw.ca> | 2004-05-19 19:16:18 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2004-05-19 19:16:18 (GMT) |
commit | c25b1816386cd466c534841bba77bae6e9aad5ab (patch) | |
tree | 214909bde0f239e4e4a8e886ca9cec363252468c /generic/tclIO.h | |
parent | 9952f1458ffdf3f22b1013dab019fb273dff357f (diff) | |
download | tcl-c25b1816386cd466c534841bba77bae6e9aad5ab.zip tcl-c25b1816386cd466c534841bba77bae6e9aad5ab.tar.gz tcl-c25b1816386cd466c534841bba77bae6e9aad5ab.tar.bz2 |
* tclIO.c: Fixed [SF Tcl Bug 943274]. This is the same problem as
* tclIO.h: [SF Tcl Bug 462317], see ChangeLog entry
2001-09-26. The fix done at that time is incomplete. It
is possible to get around it if the actual read
operation is defered and not executed in the event
handler itself. Instead of tracking if we are in an
read caused by a synthesized fileevent we now track if
the OS has delivered a true event = actual data and
bypass the driver if a read finds that there is no
actual data waiting. The flag is cleared by a short or
full read.
Diffstat (limited to 'generic/tclIO.h')
-rw-r--r-- | generic/tclIO.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/generic/tclIO.h b/generic/tclIO.h index 9a9c826..7f2c421 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.h,v 1.5 2002/01/15 17:55:30 dgp Exp $ + * RCS: @(#) $Id: tclIO.h,v 1.5.4.1 2004/05/19 19:16:24 andreas_kupries Exp $ */ /* @@ -307,6 +307,22 @@ typedef struct ChannelState { * routines will simulate a * short read (0 characters * read) */ +#define CHANNEL_HAS_MORE_DATA (1<<18) /* Set by NotifyChannel for a + * channel if and only if the + * channel is configured + * non-blocking, the driver + * for said channel has no + * blockmodeproc, and data has + * arrived for reading at the + * OS level). A GetInput will + * pass reading from the + * driver if the channel is + * non-blocking, without + * blockmode proc and the flag + * has not been set. A read + * will be performed if the + * flag is set. This will + * reset the flag as well. */ /* * For each channel handler registered in a call to Tcl_CreateChannelHandler, |