diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-21 14:22:52 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-21 14:22:52 (GMT) |
commit | a4933e22d0b56bf07cf35cb90eb1f6fd6c9e48cb (patch) | |
tree | 78f3a200ccbd78c4776b48659f02ed1690a253dd /unix/tclUnixThrd.c | |
parent | 349c1fd2676793625cc0037a11d5989b0a591397 (diff) | |
download | tcl-a4933e22d0b56bf07cf35cb90eb1f6fd6c9e48cb.zip tcl-a4933e22d0b56bf07cf35cb90eb1f6fd6c9e48cb.tar.gz tcl-a4933e22d0b56bf07cf35cb90eb1f6fd6c9e48cb.tar.bz2 |
(experiment) Use TclpMasterLock() in stead of a separate notifierInitMutex. One less mutex to be worried about.
Diffstat (limited to 'unix/tclUnixThrd.c')
-rw-r--r-- | unix/tclUnixThrd.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 554a2dc..4130993 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -357,6 +357,31 @@ TclpMasterUnlock(void) /* *---------------------------------------------------------------------- * + * TclpMasterReset + * + * This procedure is used to reset a lock that serializes creation and + * finalization of synchronization objects. + * + * Results: + * None. + * + * Side effects: + * Reset the master mutex. + * + *---------------------------------------------------------------------- + */ + +void +TclpMasterReset(void) +{ +#ifdef TCL_THREADS + pthread_mutex_init(&masterLock, NULL); +#endif +} + +/* + *---------------------------------------------------------------------- + * * Tcl_GetAllocMutex * * This procedure returns a pointer to a statically initialized mutex for |