summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
Commit message (Collapse)AuthorAgeFilesLines
* merge sebres-8-5-event-perf-branchsebres2017-07-101-1/+1
|\
| * reintegrate sebres-8-6-event-perf-branch back to 8.5sebres2017-07-101-14/+20
| |\ | |/ |/|
* | Stability fix: queue epoch to guarantee avoid broken queue, service level to ↵sebres2017-07-101-14/+20
| | | | | | | | | | | | | | | | | | avoid reset block time by nested event-cycles (if Tcl_SetTimer does not create it), etc. Fixed retarded events (using new retarded list, the involve of the retarded events occurs only after checking of all event sources now). Two opportunities to retard event: - lazy, using the same event-object: in the handler set event->proc to new (or the same) handler (fast, possible only if not entering new event-cycle in handler); - create the event with new position "TCL_QUEUE_RETARDED"; New inline functions TclpQueueEventClientData / TclpQueueEventEx to fast creating resp. queuing event with extra data.
* | merge resp. reintegrate sebres-8-5-event-perf-branch to 8.6sebres2017-07-101-34/+68
|\ \ | |/
| * don't cancel scheduled event as long as the event list is not bidirectional ↵sebres2017-07-031-1/+9
| | | | | | | | (too slow by large queue) - rewritten to cancel delayed (by execute it).
| * fixed timer-marker handling: timer should be always executed after queued ↵sebres2017-07-031-73/+58
| | | | | | | | | | | | event (of the same generation), it was marked (be sure it marked to immediate execution in corresponding checkProc only). tclIO: scheduled event rewritten using Tcl_Event instead of timer event (IO is not timer, e. g. executed also by usage of `vwait -notimer ...`, etc).
| * interim commit: trying to pass test-cases - timer-3.*, chan-io-29.34, ↵sebres2017-07-031-1/+1
| | | | | | | | socket-2.12 (busy prompt timer, unexpected too early timer event, wrong timer-marker usage)
| * code review, rewrite tclTimer, prolongation, etc. sebres2017-07-031-14/+17
| |
| * interim commit: code review, rewrite tclTimer, etc. sebres2017-07-031-7/+46
| |
* | In comments and documentation, distinguish between __int64 (a Microsoft ↵jan.nijtmans2017-03-291-1/+1
| | | | | | | | 64-bit integer type) and int64_t (C99 equivalent)
* | compatability -> compatibilityjan.nijtmans2016-12-011-1/+1
|\ \ | |/
| * compatability -> compatibilityjan.nijtmans2016-12-011-1/+1
| |
* | [104f2885bb] Rework the "chan" Tcl_ObjType to properly validate cached ↵dgp2016-07-181-86/+73
|\ \ | |/ | | | | channel name lookups.
| * [104f2885bb] Rework the "chan" Tcl_ObjType to properly validate cacheddgp2016-07-181-85/+76
| | | | | | channel name lookups.
* | [261a8a79f0] Integer overflow leads to segfault.dgp2015-11-101-1/+1
|\ \ | |/
| * [261a8a79f0] Integer overflow leads to segfault.dgp2015-11-101-1/+1
| |
| * Backout of failed attempt to fix [32ae34e63a] got checked into wrong branch.dgp2015-10-231-43/+4
| |
* | Backout failed attempt to fix [32ae34e63a].dgp2015-09-251-43/+4
|\ \ | |/
* | [e0a7b3e5f8] Add missing UpdateInterest call in DoRead().dgp2015-09-231-3/+10
|\ \ | |/
| * merge 8.5bug_e0a7b3e5f8dgp2015-09-231-4/+43
| |\
| * | Add the critical missing UpdateInterest() call at the exit of DoRead().dgp2015-08-101-3/+10
| | | | | | | | | | | | | | | | | | (Compare with same approach in DoReadChars()). This involves removing some other calls that are now replaced by the new one. Also marked several UpdateInterest() calls throughout tclIO.c with comments raising the suspicion that they serve no function.
* | | [32ae34e63a] Prevent segfaults and data corruption when CopyData() is called ↵dgp2015-09-231-4/+43
|\ \ \ | | |/ | |/| | | | | | | recursively. Mark new test io-53.20 as "knownBug". It demos some unknown flaw in MoveBytes().
| * | Protect CopyState buffer from conflicting uses when CopyData() is calleddgp2015-09-231-0/+7
| | | | | | | | | recursively. Also, have ReflectWatch() always give driver a chance to act.
| * | CopyData() now tolerates recursion enough so that io-53.18 does not segfault.dgp2015-09-231-21/+9
| | |
| * | WIPdgp2015-09-231-3/+47
| |/
* | [b1534b438b] Prevent read outside buffer boundaries.dgp2015-07-151-1/+12
|\ \ | |/
| * [b1534b438b] Prevent read outside buffer boundaries.dgp2015-07-151-1/+12
| |
* | Revert some refcount changes on I/O structs.dgp2015-07-021-2/+2
| | | | | | | | | | | | | | These are refcounts on structs, not Tcl_Obj's. Their scheme doesn't suffer the same difficulties and histories as Tcl_Obj's, and they need not copy every detail, appropriate or not, from Tcl_Obj refcount management. The "significant value" -- as dkf puts it -- for the struct refcounting scheme is 0 not 1.
* | Another round of refCount consistancy improvements.jan.nijtmans2015-07-021-29/+28
| |
* | [894da183c8] Test and fix for regression in flushing blocked channels.dgp2015-04-291-1/+4
|\ \ | |/
| * [894da183c8] Test and fix for regression in flushing blocked channels.dgp2015-04-291-1/+4
| |\
| | * [894da183c8] Fix and test for bug at the point it was introduced.bug_894da183c8dgp2015-04-291-0/+3
| | |
* | | [879a0747be] Repair handling of incomplete multi-byte chars at the ends of ↵dgp2015-04-241-6/+53
|\ \ \ | |/ / | | | | | | input buffers. Also properly reset input encoding flags when cycling through a fleeting EOF condition.
| * | [879a0747be] Repair handling of incomplete multi-byte chars at the endsdgp2015-04-241-7/+54
| | | | | | | | | | | | of input buffers. Also properly reset input encoding flags when cycling through a fleeting EOF condition.
| * | Backport of channel mem leak fix that got missed before.dgp2015-02-051-3/+15
| | |
* | | per ticket [e08c2c407b053bbfaab] (and stray code related to ↵bch2015-02-191-3/+0
| | | | | | | | | | | | [84f208762f172e]) adj code to passing test suite
* | | Even clearer failure messages.dkf2015-02-111-16/+17
| | |
* | | inputProc and outputProc tests run conditionally on TCL_READABLE, ↵bch2015-02-081-2/+2
| | | | | | | | | | | | TCL_WRITABLE mask
* | | switch raw assert() to Tcl_Panic() per discussion w/ dkf bch2015-02-071-7/+17
| | |
* | | merge [trunk]bch2015-02-071-2/+2
|\ \ \
| * | | Fix [08872796bc]dgp2015-01-291-2/+2
| | | |
* | | | truncateProc *can* be NULLbch2015-01-211-1/+0
| | | |
* | | | assert() on missing definitions for Tcl_ChannelCreate() required struct ↵bch2015-01-201-0/+9
|/ / / | | | | | | | | | Tcl_ChannelType{} fields.
* | | Now that we're using TCL_ENCODING_NO_TERMINATE - be careful about acting ondgp2015-01-021-2/+1
| | | | | | | | | | | | the contents of dst -- they could be leftovers. Only check bytes reported to have been written and take care to get the assertions right.
* | | Use the new TCL_ENCODING_CHAR_LIMIT flag to have the encoding system managedgp2014-12-231-4/+11
| | | | | | | | | the max chars to read constraint.
* | | merge trunkdgp2014-12-231-0/+3
|\ \ \
| * | | [7c187a3773] Fix error in managing inStatePtr->inQueueTail value in thedgp2014-12-181-0/+3
| | | | | | | | | | | | byte-moving optimized path of [chan copy]. Thanks to Benno.
* | | | With no padding needed for a terminating NUL, there no need for a distinctiondgp2014-11-151-5/+4
| | | | | | | | | | | | between the dstNeeded and dstLimit values.
* | | | Tcl_ExternalToUtf appends a terminating NUL to its encoded results.dgp2014-11-151-21/+23
|/ / / | | | | | | | | | | | | | | | | | | Perhaps this is a welcome convenience for some callers, but not for Tcl's I/O system, which has no need for that. Added a new flag value TCL_ENCODING_NO_TERMINATE that callers can use to suppress this behavior. This means buffers don't require so much padding, and a tiny bit of processing is saved. Update I/O callers to use the feature.
* | | Likely fix for channel mem leaks.core_8_6_3core_8_6_3_rcdgp2014-11-111-3/+15
| | |