diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-25 17:12:27 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-25 17:12:27 (GMT) |
| commit | 9bec80c561ec20b18b44df0912dd050d8d1a671d (patch) | |
| tree | 9f0bd613306a0bccbbe36a242568f134c97c4c33 /unix/tclUnixThrd.c | |
| parent | 7fd41e8f9eb1f3aef2595b3dd1b3a51507fa5b8b (diff) | |
| parent | 1f6b04d51b1c1270bf18e1535567f54c952a3158 (diff) | |
| download | tcl-9bec80c561ec20b18b44df0912dd050d8d1a671d.zip tcl-9bec80c561ec20b18b44df0912dd050d8d1a671d.tar.gz tcl-9bec80c561ec20b18b44df0912dd050d8d1a671d.tar.bz2 | |
merge trunk
Diffstat (limited to 'unix/tclUnixThrd.c')
| -rw-r--r-- | unix/tclUnixThrd.c | 60 |
1 files changed, 4 insertions, 56 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 99adbef..887689a 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -379,58 +379,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 @@ -504,17 +452,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 |
