Overview
| Comment: | 2000-05-02 Andreas Kupries <[email protected]> * Overall changes: (1) Implementation of joinable threads for all platforms. (2) Additional API's for channels. Required to allow the thread extension to move channels between threads. * generic/tcl.decls (lines 1360f): Added Tcl_JoinThread, Tcl_IsChannelShared, Tcl_IsChannelRegistered, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers (slots 394 to 400). * generic/tclIO.c: Implemented Tcl_IsChannelRegistered, Tcl_IsChannelShared, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers. Tcl_CutChannel uses code from CloseChannel. Replaced this code by a call to Tcl_CutChannel. Replaced several code fragments adding channels to the channel list with calls to Tcl_SpliceChannel. Removed now unused variables from CloseChannel and Tcl_UnstackChannel. Tcl_ClearChannelHandlers uses code from Tcl_Close. Replaced this code by a call to Tcl_ClearChannelHandlers. Removed now unused variables from Tcl_Close. Added the subcommands 'cut', 'forgetch', 'splice' and 'isshared' to the test code (TclTestChannelCmd). * unix/tclUnixThread.c: Implemented Tcl_JoinThread using the pthread-functionality. * win/tclWinThrd.c: Fixed several small typos in comments. Implemented Tcl_JoinThread using a platform independent emulation layer (see generic/tclThreadJoin.c below). Added 'joinLock' to serialize Tcl_CreateThread and TclpExitThread to prevent a race for joinable threads. * mac/tclMacThrd.c: Implemented Tcl_JoinThread using a platform independent emulation layer (see generic/tclThreadJoin.c below). Due to the cooperative nature of threading on this platform the race mentioned above is not present. * generic/tclThreadJoin.c: New file. Contains a platform independent emulation layer helping in the implementation of joinable threads for the win and mac platforms. * generic/tclInt.h: Added declarations for TclJoinThread, TclRememberJoinableThread and TclSignalExitThread. These procedures define the API of the emulation layer for joinable threads (see generic/tclThreadJoin.c above). * win/Makefile.in: * win/makefile.vc: Added generic/tclTheadJoin.o to the rules. * mac/: I don't know to which file generic/tclTheadJoin.o has to be added to so that it compiles. Sorry. * unix/tclUnixChan.c: #ifdef'd the thread-local list of file channels as it prevents us from transfering channels. To restore this we may need an extended interface to drivers in the future. Target: 9.0. Found while testing the new transfer of channels. The information in this list for a channel was left behind and then crashed the system during finalization. * generic/tclThreadTest.c: Added -joinable flag to 'testthread create'. Added subcommand 'testthread join'. * doc/CrtChannel.3: Added documentation for Tcl_IsChannelRegistered, Tcl_IsChannelShared, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting and Tcl_ClearChannelHandlers. * doc/Thread.3: Added documentation for Tcl_JoinThread. * tests/thread.test: Added tests for joining of threads. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
cdf262856d1872c95cf12baf78d90874 |
| User & Date: | kupries on 2000-05-02 22:02:32.000 |
| Other Links: | manifest | tags |
Context
|
2000-05-03
| ||
| 00:13 | * unix/Makefile.in: add tclsh.ico and tcl.spec to dist target check-in: bcfb7bbe48 user: hobbs tags: trunk | |
|
2000-05-02
| ||
| 22:02 | 2000-05-02 Andreas Kupries <[email protected]> * Overall changes: (1) Implementation of jo... check-in: cdf262856d user: kupries tags: trunk | |
|
2000-04-28
| ||
| 00:47 | * doc/library.n: Added entries for auto_qualify and auto_import [Bug: 1271]. * doc/Init.3: Manual e... check-in: 3429c5f93a user: ericm tags: trunk | |
Changes
Modified ChangeLog
from [fc1894f169]
to [2e62d78e9f].
[diff]
Modified doc/CrtChannel.3
from [07eb161339]
to [1e9fa7888b].
[diff]
Modified doc/Thread.3
from [dc1f7cd491]
to [eee9571d92].
[diff]
Modified generic/tcl.decls
from [478687ed7d]
to [aea03d4f25].
[diff]
Modified generic/tclDecls.h
from [22d48b9108]
to [51707d6a51].
[diff]
Modified generic/tclIO.c
from [62ca10258b]
to [c2429d1373].
[diff]
Modified generic/tclInt.h
from [39d3c0c143]
to [7f8fe436de].
[diff]
Modified generic/tclStubInit.c
from [ebd67f051f]
to [a8c6ba6d90].
[diff]
Added generic/tclThreadJoin.c version [2f71f8d83c].
Modified generic/tclThreadTest.c
from [319f6b270a]
to [06fb20b4cf].
[diff]
Modified mac/tclMacThrd.c
from [0b7f7f8458]
to [00d02ef1fc].
[diff]
Modified tests/thread.test
from [d830cead42]
to [33b3573d50].
[diff]
Modified unix/Makefile.in
from [06affdda63]
to [732f4e1f1a].
[diff]
Modified unix/tclUnixChan.c
from [eae66b10fb]
to [357f0f0d70].
[diff]
Modified unix/tclUnixThrd.c
from [6ccdf9e13d]
to [e18a0ae236].
[diff]
Modified win/Makefile.in
from [62b21f0a38]
to [abfc5ea5ec].
[diff]
Modified win/makefile.vc
from [8729dec0ae]
to [e94f68c809].
[diff]
Modified win/tclWinThrd.c
from [dccd3ec028]
to [017176e5b1].
[diff]