summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-21 14:22:52 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-21 14:22:52 (GMT)
commita4933e22d0b56bf07cf35cb90eb1f6fd6c9e48cb (patch)
tree78f3a200ccbd78c4776b48659f02ed1690a253dd /unix/tclUnixThrd.c
parent349c1fd2676793625cc0037a11d5989b0a591397 (diff)
downloadtcl-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.c25
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