summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.h
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2004-05-19 19:41:09 (GMT)
committerandreas_kupries <akupries@shaw.ca>2004-05-19 19:41:09 (GMT)
commitf862c606dc4ecda51a521b2ec46c7c308500af38 (patch)
tree2a23f3759735608110cf49e895e2451d47bed5f6 /generic/tclIO.h
parente8f6e134d9fe78331b2ee9696941ad0d20683403 (diff)
downloadtcl-f862c606dc4ecda51a521b2ec46c7c308500af38.zip
tcl-f862c606dc4ecda51a521b2ec46c7c308500af38.tar.gz
tcl-f862c606dc4ecda51a521b2ec46c7c308500af38.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.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/generic/tclIO.h b/generic/tclIO.h
index 9a9c826..a4eefd3 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.6 2004/05/19 19:41:10 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,