summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
diff options
context:
space:
mode:
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 18b419f..e8ad182 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -477,58 +477,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
@@ -602,17 +550,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