summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
Commit message (Collapse)AuthorAgeFilesLines
* Bring back Tcl_MutexLock() to exact implementation in Tcl 8.5.18. For ↵jan.nijtmans2015-10-181-49/+2
|\ | | | | | | details, see [ba44e415a0]: Use of mutexLock causes problem with reactive event handling in AndroWish
| * Proposed fix for [ba44e415a0]: "Use of mutexLock causes problem with ↵bug_ba44e415a0jan.nijtmans2015-10-171-46/+5
| | | | | | | | | | reactive event handling in AndroWish". This basically undoes the retry mechamism in Tcl_MutexLock, introduced in [9f8b7bea53]. Does this retry mechamism hurt more than it helps? Feedback requested.
| * Fix [5d170b5ca5e12743006d737c79f959f3efabc644|5d170b5ca5]: checkin ↵jan.nijtmans2015-09-241-56/+4
| |\ | |/ |/| | | 9f8b7bea5344f1b0 broke netbsd's thread notifier
* | Fix [5d170b5ca5e12743006d737c79f959f3efabc644|5d170b5ca5]: checkin ↵jan.nijtmans2015-09-241-56/+4
|\ \ | | | | | | | | | 9f8b7bea5344f1b0 broke netbsd's thread notifier
| * | merge trunk. jan.nijtmans2015-08-191-56/+4
| |/ | | | | Remove now unused internal functions.
| * Fix bug [57945b574a6df0332efc4ac96b066f7c347b28f7|57945b574a]: lock in ↵jan.nijtmans2015-07-231-2/+100
| |\ | |/ |/| | | forking process under heavy multithreading. Thanks to Joe Mistachkin for the implementation of the fix, and Gustaf Neumann for the original report and testing the fix.
* | Fix bug [57945b574a6df0332efc4ac96b066f7c347b28f7|57945b574a]: lock in ↵jan.nijtmans2015-07-231-6/+105
|\ \ | | | | | | | | | forking process under heavy multithreading. Thanks to Joe Mistachkin for the implementation of the fix, and Gustaf Neumann for the original report and testing the fix.
| * | The unit for usleep() is microseconds, not milliseconds.Joe Mistachkin2015-06-081-1/+1
| | |
| * | First attempt at implementing the necessary auto-magic for usleep.Joe Mistachkin2015-05-181-8/+0
| | |
| * | Adjust tweaks from the previous check-in to prepare for configure detection ↵Joe Mistachkin2015-05-181-2/+10
| | | | | | | | | | | | of usleep().
| * | Temporary tweaks to allow Thread package tests to pass on Unix.Joe Mistachkin2015-05-171-1/+5
| | |
| * | This should completely fix the race conditions at the cost of more ↵Joe Mistachkin2015-05-171-7/+34
| | | | | | | | | | | | complexity. Also, on Unix, a more reliable means than Tcl_Sleep() of sleeping for a short time is needed.
| * | Fix deadlock.Joe Mistachkin2015-05-171-1/+1
| | |
| * | Draft fix for a potential race condition in the new ↵Joe Mistachkin2015-05-171-0/+67
| |/ | | | | | | Tcl_MutexUnlockAndFinalize API. Not yet tested.
| * [3493120] Plug memory leak in thread exit.dgp2014-04-241-0/+1
| |\ | |/ |/|
| * Don't use TclpInetNtoa any more, use inet_ntoa in stead. Since IP6 support ↵jan.nijtmans2013-06-211-0/+1
| | | | | | | | it's even not necessary any more (except for fake-rfc2553, but mutexes are used here already) , but it's in the internal stub table so we cannot remove it until 9.0
| * 3530533 Centralize #include <pthread.h> in the tclUnixPort.h header so thatdgp2012-06-081-2/+0
| |\ | | | | | | | | | old unix systems that need inclusion in all compilation units are supported. Update autogoo for gettimeofday(). Thanks Joe English.
| * \ minor comment fixjan.nijtmans2011-04-281-1/+1
| |\ \
| * | | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-5/+6
| | | | | | | | | | | | 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).
| * | | | Simplify Tcl_AppInit and *_Init definitions.nijtmans2010-06-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change TclpThreadCreate and Tcl_CreateThread signature, making clear that "proc" is a function pointer, as in all other "proc" function parameters.
| * | | | Code Audit results:dkf2010-03-051-25/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations
| * | | | const addition (pkge.c)nijtmans2009-08-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Use <pthread.h> in stead of "pthread.h" Eliminate some more gcc warnings
| * | | | * unix/tclUnixThrd.c: remove unused TclpThreadGetStackSize()das2008-08-131-94/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: and related ifdefs and autoconf tests. * unix/tclUnixPort.h: [Bug 2017264] (jenglish) * unix/tcl.m4:
| * | | | CONSTified 4 functions in the Notifier which all have a Tcl_Time* in it which isnijtmans2008-07-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | supposed to be a constant, but this was not reflected in the API: Tcl_SetTimer Tcl_WaitForEvent Tcl_ConditionWait Tcl_SetMaxBlockTime Introduced a CONST86, so extensions which have their own Notifier (are there any?) can be modified to compile against both Tcl 8.5 and Tcl 8.6. This change complies with TIP #24
| * | | | * generic/tcl.h: Make Tcl_ThreadDataKey a void *.georgeps2008-05-091-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: Change around some function names and add some new per-platform declarations for thread-specific data functions. * generic/tclThread.c: Make use of of the new function names that no longer have a Tclp prefix. * generic/tclThreadStorage.c: Replace the core thread-specific data (TSD) mechanism with an array offset solution that eliminates the hash tables, and only uses one slot of native TSD. Many thanks to Kevin B. Kenny for his help with this. * unix/tclUnixThrd.c: Add platform-specific TSD functions for use by tclThreadStorage.c. * win/tclWinThrd.c: Add platform-specific TSD functions for use by tclThreadStorage.c.
* | | | | *nix segfault cleared: we should reset a thread key after freeing of alloc ↵bug_3493120sebres2014-04-231-0/+1
| |_|_|/ |/| | | | | | | | | | | cache (in tclUnixThrd.c)
* | | | 3530533 Centralize #include <pthread.h> in the tclUnixPort.h header so thatdgp2012-06-081-2/+0
| |_|/ |/| | | | | old unix systems that need inclusion in all compilation units are supported.
* | | minor comment fixjan.nijtmans2011-04-281-1/+1
|\ \ \ | |_|/ |/| |
| * | minor comment fixjan.nijtmans2011-04-281-1/+1
| | |
* | | 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.
| * * unix/tclUnixThrd.c (Tcl_JoinThread): fix for 64-bit handling ofhobbs2007-05-291-1/+5
| | | | | | | | pthread_join exit return code storage. [Bug 1712723]
| * * unix/tclUnixThrd.c (TclpInetNtoa): fix for 64 bit.das2006-12-191-1/+1
| |
| * * unix/tclUnixThrd.c (TclpInetNtoa): fix for 64 bit.das2006-12-191-3/+3
| |
| * * unix/tclUnixThrd.c (TclpInetNtoa): fix for 64 bit.das2006-12-191-6/+2
| |
| * * unix/tcl.m4, unix/configure: Backported [Bug 1095909], removinghobbs2005-07-081-47/+5
| | | | | | | | | | * unix/tclUnixPort.h: any use of readdir_r as it is not * unix/tclUnixThrd.c: necessary and just confuses things.
| * Fixed TclpFreeAllocCache() to recognize when being calledvasiljevic2005-04-071-7/+10
| | | | | | | | | | | | with NULL argument. This is a signal for it to clean up the tsd key associated with the threading allocator. Part of fixing the Tcl Bug #1178445.
| * * unix/configure: Regen.mdejong2004-11-221-1/+5
| | | | | | | | | | | | | | | | | | * unix/tcl.m4 (SC_ENABLE_THREADS): Check for a 2 argument version of readdir_r that is known to exists under IRIX 5.3. * unix/tclUnixThrd.c (TclpReaddir): Use either 2 arg or 3 arg version of readdir_r. [Bug 1001325]
| * * generic/tclAlloc.c: Fixed [Tcl SF Bug 1030548], aandreas_kupries2004-10-281-1/+1
| | | | | | | | | | | | | | * generic/tclThreadAlloc.c: threaded debug build on Windows * win/tclWinThrd.c: now works again. Had to touch Unix * unix/tclUnixThrd.c: as well. Basic patch by Kevin, with modifications by myself.
| * Changed handling of the returned thread ID since broken on 64-bitvasiljevic2004-08-101-2/+4
| | | | | | | | systems (Cray). Thanks to Rob Ratcliff for reporting the bug.
| * * generic/tclEvent.c: Correct threaded obj allocator tohobbs2004-07-211-12/+34
| | | | | | | | | | | | | | * generic/tclInt.h: fully cleanup on exit and allow for * generic/tclThreadAlloc.c: reinitialization. [Bug #736426] * unix/tclUnixThrd.c: (mistachkin, kenny) * win/tclWinThrd.c:
| * * unix/tclUnixThrd.c (TclpFinalizeMutex): Accepted Joeandreas_kupries2004-07-151-0/+1
| | | | | | | | | | Mistachkin's patch for [Tcl SF Bug 99453], closing leakage of mutexes. They were not destroyed properly upon finalization.
| * Corrected Tcl Bug #770053vasiljevic2004-06-221-2/+2
| |
| * 2004-05-14 Kevin B. Kenny <kennykb@acm.org> Kevin B Kenny2004-05-141-47/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.decls: Promoted TclpLocaltime and TclpGmtime * generic/tclIntDecls.h: from Unix-specific stubs to the generic * generic/tclIntPlatDecls.h: internal Stubs table. Reran 'genstubs' * generic/tclStubInit.c: * unix/tclUnixPort.h: * generic/tclClock.c: Changed a buggy 'GMT' timezone specification to the correct 'GMT0'. [Bug #922848] * unix/tclUnixThrd.c: Moved TclpGmtime and TclpLocaltime to unix/tclUnixTime.c where they belong. * unix/tclUnixTime.c (TclpGmtime, TclpLocaltime, TclpGetTimeZone, ThreadSafeGMTime [removed], ThreadSafeLocalTime [removed], SetTZIfNecessary, CleanupMemory): Restructured to make sure that the same mutex protects all calls to localtime, gmtime, and tzset. Added a check in front of those calls to make sure that the TZ env var hasn't changed since the last call to tzset, and repeat tzset if necessary. [Bug #942078] Removed a buggy test of the Daylight Saving Time information in 'gettimeofday' in favor of applying 'localtime' to a known value. [Bug #922848] * tests/clock.test (clock-3.14): Added test to make sure that changes to $env(TZ) take effect immediately. * win/tclWinTime.c (TclpLocaltime, TclpGmtime): Added porting layer for 'localtime' and 'gmtime' calls.
| * * generic/tclInt.h:davygrvy2004-05-061-0/+30
| | | | | | | | | | | | | | | | | | * generic/tclThread.c: * generic/tclEvent.c: * unix/tclUnixThrd.c: * win/tclWinThrd.c: Provisions made so masterLock, initLock, allocLock and joinLock mutexes can be recovered during Tcl_Finalize.
| * fix for [Bug 732477]Joe Mistachkin2003-05-131-6/+6
| |
| * Corrected the Tcl bug #723502vasiljevic2003-05-121-1/+1
| |
* | * unix/tclUnixThrd.c (TclpThreadGetStackSize): restore stackMiguel Sofer2008-01-111-8/+11
| | | | | | | | checking functionality in freebsd [Bug 1850424]
* | * unix/tclUnixThrd.c (TclpThreadGetStackSize): fix for crash inMiguel Sofer2008-01-111-7/+4
| | | | | | | | freebsd [Bug 1860425].