diff options
| author | dgp@users.sourceforge.net <dgp> | 2013-02-26 16:38:17 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2013-02-26 16:38:17 (GMT) |
| commit | b837811edeab8d674fd3bddd3ab74976f2f3505d (patch) | |
| tree | c89a9667569815de5421bdf48dc2906d17cd87c8 /generic/tclIO.c | |
| parent | d846192f407df5c67d831ff90a4a9a22d488b94b (diff) | |
| download | tcl-b837811edeab8d674fd3bddd3ab74976f2f3505d.zip tcl-b837811edeab8d674fd3bddd3ab74976f2f3505d.tar.gz tcl-b837811edeab8d674fd3bddd3ab74976f2f3505d.tar.bz2 | |
struct NextChannelHandler used only locally. Remove from tclIO.h.
Diffstat (limited to 'generic/tclIO.c')
| -rw-r--r-- | generic/tclIO.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index ed08112..a944314 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -22,6 +22,30 @@ /* + * This structure keeps track of the current ChannelHandler being invoked in + * the current invocation of ChannelHandlerEventProc. There is a potential + * problem if a ChannelHandler is deleted while it is the current one, since + * ChannelHandlerEventProc needs to look at the nextPtr field. To handle this + * problem, structures of the type below indicate the next handler to be + * processed for any (recursively nested) dispatches in progress. The + * nextHandlerPtr field is updated if the handler being pointed to is deleted. + * The nextPtr field is used to chain together all recursive invocations, so + * that Tcl_DeleteChannelHandler can find all the recursively nested + * invocations of ChannelHandlerEventProc and compare the handler being + * deleted against the NEXT handler to be invoked in that invocation; when it + * finds such a situation, Tcl_DeleteChannelHandler updates the nextHandlerPtr + * field of the structure to the next handler. + */ + +typedef struct NextChannelHandler { + ChannelHandler *nextHandlerPtr; /* The next handler to be invoked in + * this invocation. */ + struct NextChannelHandler *nestedHandlerPtr; + /* Next nested invocation of + * ChannelHandlerEventProc. */ +} NextChannelHandler; + +/* * All static variables used in this file are collected into a single * instance of the following structure. For multi-threaded implementations, * there is one instance of this structure for each thread. |
