diff options
Diffstat (limited to 'unix')
-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 +} /* *---------------------------------------------------------------------- |