summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-09-24 11:06:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-09-24 11:06:44 (GMT)
commitfaef5b981f8970b1e9210ac68ab9975918e6500c (patch)
tree2ae41f24c9d29f6ca8124e305514a4dc07a62ace /unix/tclUnixThrd.c
parentdaa0c940b864f45566deda0f3e5ec700a8aa62ee (diff)
parent92b0e1240376f8353e5d7792183d1bb856698146 (diff)
downloadtcl-faef5b981f8970b1e9210ac68ab9975918e6500c.zip
tcl-faef5b981f8970b1e9210ac68ab9975918e6500c.tar.gz
tcl-faef5b981f8970b1e9210ac68ab9975918e6500c.tar.bz2
Fix [5d170b5ca5e12743006d737c79f959f3efabc644|5d170b5ca5]: checkin 9f8b7bea5344f1b0 broke netbsd's thread notifier
Diffstat (limited to 'unix/tclUnixThrd.c')
-rw-r--r--unix/tclUnixThrd.c60
1 files changed, 4 insertions, 56 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 02f18b8..ae81c5f 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -385,58 +385,6 @@ TclpMasterUnlock(void)
/*
*----------------------------------------------------------------------
*
- * TclpMutexLock
- *
- * This procedure is used to grab a lock that serializes locking
- * another mutex.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-void
-TclpMutexLock(void)
-{
-#ifdef TCL_THREADS
- pthread_mutex_lock(&mutexLock);
-#endif
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
- * TclpMutexUnlock
- *
- * This procedure is used to release a lock that serializes locking
- * another mutex.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-void
-TclpMutexUnlock(void)
-{
-#ifdef TCL_THREADS
- pthread_mutex_unlock(&mutexLock);
-#endif
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
* Tcl_GetAllocMutex
*
* This procedure returns a pointer to a statically initialized mutex for
@@ -510,17 +458,17 @@ retry:
MASTER_UNLOCK;
}
while (1) {
- TclpMutexLock();
+ pthread_mutex_lock(&mutexLock);
pmutexPtr = *((pthread_mutex_t **)mutexPtr);
if (pmutexPtr == NULL) {
- TclpMutexUnlock();
+ pthread_mutex_unlock(&mutexLock);
goto retry;
}
if (pthread_mutex_trylock(pmutexPtr) == 0) {
- TclpMutexUnlock();
+ pthread_mutex_unlock(&mutexLock);
return;
}
- TclpMutexUnlock();
+ pthread_mutex_unlock(&mutexLock);
/*
* BUGBUG: All core and Thread package tests pass when usleep()
* is used; however, the Thread package tests hang at