summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix [3cc1d91345]: duplicate calls to TclpFreeAllocCache() on thread existsjan.nijtmans2016-10-111-2/+8
|\
| * Fix [3cc1d91345]: duplicate calls to TclpFreeAllocCache() on thread existsjan.nijtmans2016-10-111-3/+4
| |\
| | * Fix [3cc1d91345]: duplicate calls to TclpFreeAllocCache() on thread existsjan.nijtmans2016-10-111-3/+4
| | |
* | | Simplify use of "struct" keyword in many places.jan.nijtmans2016-06-301-4/+4
| | |
* | | RFE [0ef5e653ff4caf5f896ec1182e0aac38ab9a0c46|0ef5e653]: Add nsf to ↵jan.nijtmans2016-04-011-2/+2
|\ \ \ | |/ / | | | | | | coffbase.txt. Eliminate exess spacing
* | | Two micro-optimizations in Win and UNIX notifier. See: ↵jan.nijtmans2016-04-011-17/+10
|\ \ \ | | | | | | | | | | | | [http://code.activestate.com/lists/tcl-core/15645/]
| * \ \ - Undo unix notifier changes: too risky at this moment. jan.nijtmans2016-03-251-42/+10
| |\ \ \ | |/ / / |/| | | | | | | - Merge trunk - (cherry-pick from dhr-micro-optimization): Micro-optimization: remove double checked lock from TclGetAllocCache in favour of initialization in TclInitSubsystems
| * | | (experiment) Use TclpMasterLock() in stead of a separate notifierInitMutex. ↵jan.nijtmans2016-03-211-0/+25
|/ / / | | | | | | | | | One less mutex to be worried about.
* | | Fix [d3071887dbc7aeac]: Fix SEGV in Tcl_FinalizeNotifier(). Thanks to ↵jan.nijtmans2016-03-211-12/+5
|/ / | | | | | | | | | | | | hirofumi for both the bug-report and the fix. Use TclpMasterLock() in stead of MASTER_LOCK everywhere (in stead of in some files only, not in others). Use "static int initialized" variable consistantly. Fix some comments. No change of functionality.
* | Bring back Tcl_MutexLock() to exact implementation in Tcl 8.6.4. For ↵jan.nijtmans2015-10-181-49/+2
|\ \ | |/ | | | | details, see [ba44e415a0]: Use of mutexLock causes problem with reactive event handling in AndroWish
| * 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.