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 | 6ca0220e0bbb307e4e66a47e9bce0d2c92eb9032 (patch) | |
| tree | 78f3a200ccbd78c4776b48659f02ed1690a253dd /unix/tclUnixThrd.c | |
| parent | a2827884a964758c13230c45ba18fa131cabbb8d (diff) | |
| download | tcl-6ca0220e0bbb307e4e66a47e9bce0d2c92eb9032.zip tcl-6ca0220e0bbb307e4e66a47e9bce0d2c92eb9032.tar.gz tcl-6ca0220e0bbb307e4e66a47e9bce0d2c92eb9032.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 |
