diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-24 11:06:44 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-24 11:06:44 (GMT) |
commit | faef5b981f8970b1e9210ac68ab9975918e6500c (patch) | |
tree | 2ae41f24c9d29f6ca8124e305514a4dc07a62ace /win | |
parent | daa0c940b864f45566deda0f3e5ec700a8aa62ee (diff) | |
parent | 92b0e1240376f8353e5d7792183d1bb856698146 (diff) | |
download | tcl-faef5b981f8970b1e9210ac68ab9975918e6500c.zip tcl-faef5b981f8970b1e9210ac68ab9975918e6500c.tar.gz tcl-faef5b981f8970b1e9210ac68ab9975918e6500c.tar.bz2 |
Fix [5d170b5ca5e12743006d737c79f959f3efabc644|5d170b5ca5]: checkin 9f8b7bea5344f1b0 broke netbsd's thread notifier
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinThrd.c | 54 |
1 files changed, 4 insertions, 50 deletions
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index 7fd5ff5..ae7ce80 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -482,52 +482,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) -{ - EnterCriticalSection(&mutexLock); -} - -/* - *---------------------------------------------------------------------- - * - * TclpMutexUnlock - * - * This procedure is used to release a lock that serializes locking - * another mutex. - * - * Results: - * None. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -void -TclpMutexUnlock(void) -{ - LeaveCriticalSection(&mutexLock); -} - -/* - *---------------------------------------------------------------------- - * * Tcl_GetAllocMutex * * This procedure returns a pointer to a statically initialized mutex for @@ -652,17 +606,17 @@ retry: MASTER_UNLOCK; } while (1) { - TclpMutexLock(); + EnterCriticalSection(&mutexLock); csPtr = *((CRITICAL_SECTION **)mutexPtr); if (csPtr == NULL) { - TclpMutexUnlock(); + LeaveCriticalSection(&mutexLock); goto retry; } if (TryEnterCriticalSection(csPtr)) { - TclpMutexUnlock(); + LeaveCriticalSection(&mutexLock); return; } - TclpMutexUnlock(); + LeaveCriticalSection(&mutexLock); Tcl_Sleep(TCL_MUTEX_LOCK_SLEEP_TIME); } } |