diff options
| author | davygrvy@pobox.com <davygrvy> | 2004-04-23 07:20:09 (GMT) |
|---|---|---|
| committer | davygrvy@pobox.com <davygrvy> | 2004-04-23 07:20:09 (GMT) |
| commit | bad8ff38e123cce2be4458fccad12c17f5d9e17b (patch) | |
| tree | 88e958c61aa8200f45ed61a91030511bb71521d5 /unix/tclUnixThrd.c | |
| parent | a09dbf4d101610df95c13540fd4a3e8e19da727d (diff) | |
| download | tcl-bad8ff38e123cce2be4458fccad12c17f5d9e17b.zip tcl-bad8ff38e123cce2be4458fccad12c17f5d9e17b.tar.gz tcl-bad8ff38e123cce2be4458fccad12c17f5d9e17b.tar.bz2 | |
* generic/tclInt.h:
* 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.
Diffstat (limited to 'unix/tclUnixThrd.c')
| -rw-r--r-- | unix/tclUnixThrd.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index f67248c..c087423 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -254,7 +254,37 @@ TclpInitLock() pthread_mutex_lock(&initLock); #endif } + +/* + *---------------------------------------------------------------------- + * + * TclpFinalizeLock + * + * This procedure is used to destroy all private resources used in + * this file. + * + * Results: + * None. + * + * Side effects: + * Destroys everything private. TclpInitLock must be held + * entering this function. + * + *---------------------------------------------------------------------- + */ +void +TclFinalizeLock () +{ +#ifdef TCL_THREADS + /* + * You do not need to destroy mutexes that were created with the + * PTHREAD_MUTEX_INITIALIZER macro. These mutexes do not need + * any destruction: masterLock, allocLock, and initLock. + */ + pthread_mutex_unlock(&initLock); +#endif +} /* *---------------------------------------------------------------------- |
