summaryrefslogtreecommitdiffstats
path: root/generic/tclThreadTest.c
Commit message (Collapse)AuthorAgeFilesLines
* Tcl_SetVar -> Tcl_SetVar2 and comparable replacements, eliminating functions ↵jan.nijtmans2016-06-291-3/+3
| | | | which are deprecated.
* Fix gcc 5.3 warning: In function ‘NRInterpCmd’: tclInterp.c:726:5: ↵jan.nijtmans2016-03-041-2/+2
| | | | | | warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow] if ((i + 2) < objc) { Remove some excessive spacing
* Eliminate some usages of Tcl_GlobalEval() and Tcl_Eval(), which are ↵jan.nijtmans2016-01-181-3/+3
| | | | deprecated functions.
* Fix env.test when running mingw-w64 (AMD64 build) test-suite on wine64. jan.nijtmans2013-06-131-9/+9
|\ | | | | Fix some gcc warnings which become visible with -Wextra
| * Fix some gcc warnings which become visible with -Wextrajan.nijtmans2013-06-131-11/+11
| |
* | Another memory leak, and one Tcl_Free -> ckfreejan.nijtmans2013-01-251-0/+1
| |
* | Eliminate some unneeded usages of Tcl_SetResult, Tcl_AddObjErrorInfojan.nijtmans2013-01-251-1/+1
| | | | | | Fix "make test-packages" on cygwin
* | test Tcl_GetErrorLine() forwards/backwards compatibility in pkgb.so as well. jan.nijtmans2013-01-021-1/+0
|\ \ | |/ | | Don't free ctrl.script if thread creation fails: it is a constant string "testthread wait" normally.
| * test Tcl_GetErrorLine() forwards/backwards compatibility in pkgb.so as well. jan.nijtmans2013-01-021-9/+8
| |\ | | | | | | | | | Marked some string subcommands as obsolete, following discussion on tcl-core. Don't free ctrl.script if thread creation fails: it is a constant string "testthread wait" normally.
| | * Don't free ctrl.script if thread creation fails: it is a constant string ↵jan.nijtmans2013-01-021-1/+0
| | | | | | | | | | | | "testthread wait" normally.
* | | For [testthread cancel], avoid creating a new Tcl_Obj when the default ↵Joe Mistachkin2011-11-181-1/+2
| | | | | | | | | | | | script cancellation result is desired.
* | | Revise the thread exit handling of the [testthread] command so that itdgp2011-09-211-3/+9
| | | | | | | | | | | | properly maintains the per-process data structures even when the thread exits for reasons other than the [testthread exit] command.
* | | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-9/+9
| | | | | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ \ \ | |/ / | | | cause more harm than good. Purged them (except in zlib files).
| * | Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ \ | | |/ | | | more harm than good. Purged them.
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | more harm than good. Purged them.
| | * Fix [Bug 1562528]dkf2006-09-221-2/+2
| | |
| | * * tests/compile.test (compile-12.4): Backport test for Bug 1001997.dgp2004-10-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/timer.test (timer-10.1): Backport test for Bug 1016167. * tests/tcltest.test (tcltest-12.3,4): Backport setup corrections. * tests/error.test (error-6.3,4,7,9): Backport of some tests. * tests/basic.test (basic-49.*): * tests/namespace.test (namespace-8.7): * tests/init.test (init-2.8): Updated to not rely on http package. * generic/tclThreadTest.c (ThreadEventProc): Corrected subtle bug where the returned (char *) from Tcl_GetStringResult(interp) continued to be used without copying or refcounting, while activity on the interp continued.
* | | fix gcc 64-bit warnings: cast from pointer to integer of different sizenijtmans2010-12-011-11/+11
| | | | | | | | | | | | fix gcc(-4.5.2) warning: 'static' is not at beginning of declaration
* | | #undef STATIC_BUILD in tclWin(Dde|Reg).c, in order to makenijtmans2009-11-231-37/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sure that Xxxxx_Init is always exported even when Tcl is built static (otherwise we cannot create a DLL). tclThreadTest.c: Make all functions static, except TclThread_Init. fCmd.test Enable fCmd-30.1 when registry is available. tcl.m4 Fix ${SHLIB_LD_LIBS} definition, fix conflicts configure.in between static libraries and import library on windows. configure (regenerated) Makefile.in Simplifications related to tcl.m4 changes.
* | | * generic/tclThreadTest.c (NewTestThread): [Bug 2901803]Kevin B Kenny2009-11-231-2/+2
| | | | | | | | | | | | | | | Further machinations to get NewTestThread actually to launch the thread, not just compile.
* | | [Bug 2901803]: Fix silly error.dkf2009-11-231-14/+16
| | |
* | | Fix [Bug 2883850]: pkgIndex.tcl doesn'tnijtmans2009-11-181-5/+11
| | | | | | | | | | | | get created with static Tcl build
* | | - eliminate some unnessary type castsnijtmans2009-02-101-10/+9
| | | | | | | | | | | | | | | - some internal const decorations - spacing
* | | Style fixes (unfouling whitespace, sorting comments, removing useless casts, ↵dkf2009-01-091-49/+44
| | | | | | | | | | | | etc.)
* | | eliminate -Wwrite-strings warnings in enable-threads build.nijtmans2008-12-161-6/+6
| | | | | | | | | | | | use TclNewLiteralStringObj()
* | | Convert Tcl_SetResult(......, TCL_DYNAMIC) tonijtmans2008-11-191-2/+3
| | | | | | | | | | | | | | | Tcl_SetResult(......, TCL_VOLATILE), in preparation for TIP #340
* | | Add "const" to many internalnijtmans2008-10-161-3/+3
| | | | | | | | | | | | | | | const tables. No functional or API change.
* | | fix [2021443] inconsistant "wrong # args" messagesnijtmans2008-07-191-2/+2
| | |
* | | TIP 285 ImplementationJoe Mistachkin2008-06-131-9/+160
|/ /
* | Fix [Bug 1562528]dkf2006-09-221-29/+29
| |
* | ANSIfy the test code (well, strip some of the worst offences!)dkf2005-11-021-274/+292
| |
* | TIP#237 IMPLEMENTATIONdgp2005-10-081-1/+3
| | | | | | | | | | | | [kennykb-numerics-branch] Resynchronized with the HEAD; at this checkpoint [-rkennykb-numerics-branch-20051008], the HEAD and kennykb-numerics-branch contain identical code.
* | * generic/tclIO.c: Moved Tcl_{Cut,Splice}Channel toandreas_kupries2005-08-261-1/+7
| | | | | | | | | | | | | | | | | | {Cut,Splice}Channel for internal use, and created new public functions for Tcl_{Cut,Splice}Channel which walk the whole stack of transformations and invoke the necessary thread actions. Added code to Tcl_(Un)StackChannel to properly invoke the thread actions when pushing and popping transformations on/from a channel.
* | TIP#219 IMPLEMENTATIONandreas_kupries2005-08-241-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/SetChanErr.3: ** New File **. Documentation of the new channel API functions. * generic/tcl.decls: Stub declarations of the new channel API. * generic/tclDecls.h: Regenerated * generic/tclStubInit.c: * tclIORChan.c: ** New File **. Implementation of the reflected channel. * generic/tclInt.h: Integration of reflected channel and new error * generic/tclIO.c: propagation into the generic I/O core. * generic/tclIOCmd.c: * generic/tclIO.h: * library/init.tcl: * tests/io.test: Extended testsuite. * tests/ioCmd.test: * tests/chan.test: * generic/tclTest.c: * generic/tclThreadTest.c: * unix/Makefile.in: Integration into the build machinery. * win/Makefile.in: * win/Makefile.vc:
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
| |
* | * generic/tclCompile.h: Move the TclInterpReady() declaration fromdgp2005-03-251-4/+1
| | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: tclCompile.h to tclInt.h. Should have been done as part of the 1115904 bug fix on 2005-03-18. * generic/tclThreadTest.c: Stop providing the phony package "Thread 1.0" when the [::testthread] command is defined. It's never used by anything, and conflicts with loading the real "Thread" package.
* | * generic/tclThreadTest.c (ThreadEventProc): Corrected subtledgp2004-10-201-2/+2
|/ | | | | | | | bug where the returned (char *) from Tcl_GetStringResult(interp) continued to be used without copying or refcounting, while activity on the interp continued. That's not safe, and recent changes demonstrated the lack of safety with failing tests thread-4.3 and thread-4.5.
* * Sought out and eliminated instances of CONST-casting that are nodgp2002-01-261-4/+4
| | | | longer needed after the TIP 27 effort.
* * Updated interfaces of generic/tclEncoding, generic/tclFilename.c,dgp2002-01-251-4/+4
| | | | | | | | | | | generic/tclIOUtil.c, generic/tclPipe.c, generic/tclResult.c, generic/tclUtil.c, generic/tclVar.c and mac/tclMacResource.c according to TIP 27. Tcl_TranslateFileName rewritten as wrapper around VFS-aware version. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes source incompatibilities: argv arguments of Tcl_Concat, Tcl_JoinPath, Tcl_OpenCommandChannel, Tcl_Merge; argvPtr arguments of Tcl_SplitList and Tcl_SplitPath.
* * generic/tclThreadTest.c:das2002-01-181-2/+2
| | | | | | | | | * mac/tclMacChan.c: * mac/tclMacFCmd.c: * mac/tclMacFile.c: * mac/tclMacLoad.c: * mac/tclMacResource.c: TIP 27 CONSTification broke the mac build in a number of places.
* correct static-ness of function declshobbs2001-12-291-5/+5
|
* ** upport to 8.4 of mac code changes for 8.3.3 & various newdas2001-11-231-5/+5
| | | | | | ** changes for 8.4, some already backported to 8.3.4 (patch #435658) see ChangeLog for details
* * generic/tclThreadTest.c (Tcl_ThreadObjCmd): cast fixeshobbs2001-03-311-3/+3
|
* 2000-05-02 Andreas Kupries <a.kupries@westend.com>kupries2000-05-021-13/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Added Tcl_CreateThreadType and TCL_RETURN_THREAD_TYPEwelch2000-04-171-14/+5
| | | | macros for declaring the NewThread callback proc.
* 2000-04-08 Andreas Kupries <a.kupries@westend.com>kupries2000-04-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Overall change: Definition of a public API for the creation of new threads. * generic/tclInt.h (line 1802f): Removed the definition of 'TclpThreadCreate'. (line 793f) Removed the definition of 'Tcl_ThreadCreateProc'. * generic/tcl.h (line 388f): Readded the definition of 'Tcl_ThreadCreateProc'. Added Win32 stuff send in by David Graveraux <davygrvy@bigfoot.com> to that too (__stdcall, ...). Added macros for the default stacksize and allowed flags. * generic/tcl.decls (line 1356f): Added definition of 'Tcl_CreateThread', slot 393 of the stub table. Two new arguments in the public API, for stacksize and flags. * win/tclWinThrd.c: * mac/tclMacThrd.c: Renamed TclpThreadCreate to Tcl_CreateThread, added handling of the stacksize. Flags are currently ignored. * unix/tclUnixThrd.c: See above, but handles joinable flag. Ignores the specified stacksize if the macro HAVE_PTHREAD_ATTR_SETSTACKSIZE is not defined. * generic/tclThreadTest.c (line 363): See below. * unix/tclUnixNotfy.c (line 210): Adapted to the changes above. Uses default stacksize and no flags now. * unic/tcl.m4 (line 382f): Added a check for 'pthread_attr_setstacksize' to detect platforms not implementing this feature of pthreads. If it is implemented, configure will define the macro HAVE_PTHREAD_ATTR_SETSTACKSIZE (See unix/tclUnixThrd.c too). * doc/Thread.3: Added Tcl_CreateThread and its arguments to the list of described functions. Removed stuff about not providing a public C-API for thread-creation.
* 2000-04-03 Andreas Kupries <a.kupries@westend.com>kupries2000-04-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Overall change: Definition of public API's for the finalization of conditions and mutexes. [Bug: 4199]. * generic/tclInt.h: Removed definitions of TclFinalizeMutex and TclFinalizeCondition. * generic/tcl.decls: Added declarations of Tcl_MutexFinalize and Tcl_ConditionFinalize. * generic/tclThread.c: Renamed TclFinalizeMutex to Tcl_MutexFinalize. Renamed TclFinalizeCondition to Tcl_ConditionFinalize. * generic/tclNotify.c: Changed usage of TclFinalizeMutex to Tcl_MutexFinalize. * unix/tclUnixNotfy.c: * generic/tclThreadTest.c: Changed usages of TclFinalizeCondition to Tcl_ConditionFinalize. * generic/tcl.h: Added empty macros for Tcl_MutexFinalize and Tcl_ConditionFinalize, to be used when the core is compiled without threads. * doc/Thread.3: Added description the new API's.
* * generic/tclClock.c: fixed support for 64bit handling of clockhobbs2000-01-121-2/+2
| | | | | | | | | | | | values [Bug: 1806] * generic/tclThreadTest.c: upped a buffer size to hold double * tests/info.test: * generic/tclCmdIL.c: fixed 'info procs ::namesp::*' behavior (Dejong) * generic/tclNamesp.c: made imported commands also import their compile proc [Bug: 2100]
* * generic/tclCmdIL.c: added -unique option to lsorthobbs1999-12-211-6/+6
| | | | * generic/tclThreadTest.c: changed thread ids to longs [Bug: 3902]