diff options
Diffstat (limited to 'unix/tclUnixThrd.c')
| -rw-r--r-- | unix/tclUnixThrd.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 302249a..206e999 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -161,12 +161,12 @@ PCondTimedWait( #endif /* HAVE_PTHREAD_MUTEX_RECURSIVE */ /* - * masterLock is used to serialize creation of mutexes, condition variables, + * globalLock is used to serialize creation of mutexes, condition variables, * and thread local storage. This is the only place that can count on the * ability to statically initialize the mutex. */ -static pthread_mutex_t masterLock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t globalLock = PTHREAD_MUTEX_INITIALIZER; /* * initLock is used to serialize initialization and finalization of Tcl. It @@ -415,7 +415,7 @@ TclFinalizeLock(void) /* * You do not need to destroy mutexes that were created with the * PTHREAD_MUTEX_INITIALIZER macro. These mutexes do not need any - * destruction: masterLock, allocLock, and initLock. + * destruction: globalLock, allocLock, and initLock. */ pthread_mutex_unlock(&initLock); @@ -450,7 +450,7 @@ TclpInitUnlock(void) /* *---------------------------------------------------------------------- * - * TclpMasterLock + * TclpGlobalLock * * This procedure is used to grab a lock that serializes creation and * finalization of serialization objects. This interface is only needed @@ -463,23 +463,23 @@ TclpInitUnlock(void) * None. * * Side effects: - * Acquire the master mutex. + * Acquire the global mutex. * *---------------------------------------------------------------------- */ void -TclpMasterLock(void) +TclpGlobalLock(void) { #if TCL_THREADS - pthread_mutex_lock(&masterLock); + pthread_mutex_lock(&globalLock); #endif } /* *---------------------------------------------------------------------- * - * TclpMasterUnlock + * TclpGlobalUnlock * * This procedure is used to release a lock that serializes creation and * finalization of synchronization objects. @@ -488,16 +488,16 @@ TclpMasterLock(void) * None. * * Side effects: - * Release the master mutex. + * Release the global mutex. * *---------------------------------------------------------------------- */ void -TclpMasterUnlock(void) +TclpGlobalUnlock(void) { #if TCL_THREADS - pthread_mutex_unlock(&masterLock); + pthread_mutex_unlock(&globalLock); #endif } @@ -563,10 +563,10 @@ Tcl_MutexLock( PMutex *pmutexPtr; if (*mutexPtr == NULL) { - pthread_mutex_lock(&masterLock); + pthread_mutex_lock(&globalLock); if (*mutexPtr == NULL) { /* - * Double inside master lock check to avoid a race condition. + * Double inside global lock check to avoid a race condition. */ pmutexPtr = (PMutex *)Tcl_Alloc(sizeof(PMutex)); @@ -574,7 +574,7 @@ Tcl_MutexLock( *mutexPtr = (Tcl_Mutex) pmutexPtr; TclRememberMutex(mutexPtr); } - pthread_mutex_unlock(&masterLock); + pthread_mutex_unlock(&globalLock); } pmutexPtr = *((PMutex **) mutexPtr); PMutexLock(pmutexPtr); @@ -614,7 +614,7 @@ Tcl_MutexUnlock( * This procedure is invoked to clean up one mutex. This is only safe to * call at the end of time. * - * This assumes the Master Lock is held. + * This assumes the Global Lock is held. * * Results: * None. @@ -671,7 +671,7 @@ Tcl_ConditionWait( struct timespec ptime; if (*condPtr == NULL) { - pthread_mutex_lock(&masterLock); + pthread_mutex_lock(&globalLock); /* * Double check inside mutex to avoid race, then initialize condition @@ -684,7 +684,7 @@ Tcl_ConditionWait( *condPtr = (Tcl_Condition) pcondPtr; TclRememberCondition(condPtr); } - pthread_mutex_unlock(&masterLock); + pthread_mutex_unlock(&globalLock); } pmutexPtr = *((PMutex **) mutexPtr); pcondPtr = *((pthread_cond_t **) condPtr); @@ -748,7 +748,7 @@ Tcl_ConditionNotify( * This procedure is invoked to clean up a condition variable. This is * only safe to call at the end of time. * - * This assumes the Master Lock is held. + * This assumes the Global Lock is held. * * Results: * None. @@ -887,19 +887,19 @@ TclpThreadDeleteKey( } void -TclpThreadSetMasterTSD( +TclpThreadSetGlobalTSD( void *tsdKeyPtr, void *ptr) { pthread_key_t *ptkeyPtr = (pthread_key_t *)tsdKeyPtr; if (pthread_setspecific(*ptkeyPtr, ptr)) { - Tcl_Panic("unable to set master TSD value"); + Tcl_Panic("unable to set global TSD value"); } } void * -TclpThreadGetMasterTSD( +TclpThreadGetGlobalTSD( void *tsdKeyPtr) { pthread_key_t *ptkeyPtr = (pthread_key_t*)tsdKeyPtr; |
