| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
of TIP 27. Several minor documentation corrections as well.
* Updated channel driver interface according to the guidelines of
TIP 27. See also [Bug 500348].
* Moved Tcl_EolTranslation enum declaration from generic/tcl.h to
generic/tclInt.h (renamed to TclEolTranslation). It is not used
anywhere in Tcl's public interface.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
more than was in the buffers and then blocked in the OS call as
its pty channel driver provides no blockmodeproc through which
the OS could be notified of blocking-behaviour. Because of this
the general I/O core has to take more care than usual to
preserve the semantics of non-blocking channels.
* generic/tclIO.c (Tcl_ReadRaw): Do not read from the driver if
the channel is non-blocking and the fileevent causing the read
was generated by a timer. We do not know if there is data
available from the OS. Instead of going to the OS for more and
potentially blocking we simply signal EWOULDBLOCK to the higher
levels to cause the system to wait for true fileevents.
(GetInput): Same as before.
(ChannelTimerProc): Added set and clear of CHANNEL_TIMER_FEV.
* generic/tclIO.h (CHANNEL_TIMER_FEV): New flag for channels. Is
set if a fileevent was generated by a timer, the channel is not
blocking and the driver did not provide a blockmodeproc. In that
case the I/O core has to be especially careful about going to
the driver for more data.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* All of the changes below belong to TIP #10 [Tcl I/O Enhancement:
Thread-Aware Channels]. See also [Patch #403358] at SF.
* generic/tclIO.h (struct ChannelState, line 236f): Extended the
structure with a new field of type 'Tcl_ThreadId' to hold the id
of the thread currently managing all channels with this state.
Note: This structure is shared by all channels in a stack of
transformations.
* generic/tclIO.c (Tcl_CreateChannel, lines 1058-1065): Modified
to store the Id of the current thread in the 'ChannelState' of
the new channel.
* generic/tclIO.c (Tcl_SpliceChannel, lines 2265-2270): Modified
in the same manner as 'Tcl_CreateChannel' as the channel will be
managed by the current thread afterward.
* generic/tclIO.c (Tcl_GetChannelThread, lines 1478-1503):
* generic/tcl.decls (Tcl_GetChannelThread, lines 1504-1506): New
API function to retrieve the Id of the managing thread from a
channel. Implementation and declaration.
* generic/tclTest.c (TestChannelCmd, lines 4520-4532): Added
subcommand 'mthread' to query a channel about its managing
thread.
|
|
|
|
| |
8.4a2 code base, merged in with some existing new 8.4a2 features.
|
|
* generic/tclIO.c: moved channel test commands from tclIO.c to
tclTest.c.
* generic/tclIO.h: new file, split out from tclIO.c to allow test
commands to be moved to tclTest.c.
* generic/tclStubInit.c:
* generic/tclIntDecls.h:
* generic/tclInt.decls: removed TclTestChannel*Cmd from internal
stubs table and added TclChannelEventScriptInvoker to the internal
stubs table so it can be used from the test code.
|