diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-24 10:54:07 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-24 10:54:07 (GMT) |
commit | 2101ef45be45e0aa88d3e8c9725df9ca92309fe9 (patch) | |
tree | 3552bbb539fdc3bd92e752345c554eeee27d648b /win/tclWinThrd.c | |
parent | 61ad28e5b697aee8b22a823efd9333905ce1e787 (diff) | |
parent | 0f2b1bbb2e2b5d7c124d12df2e73a90c119390a4 (diff) | |
download | tcl-2101ef45be45e0aa88d3e8c9725df9ca92309fe9.zip tcl-2101ef45be45e0aa88d3e8c9725df9ca92309fe9.tar.gz tcl-2101ef45be45e0aa88d3e8c9725df9ca92309fe9.tar.bz2 |
Fix [5d170b5ca5e12743006d737c79f959f3efabc644|5d170b5ca5]: checkin 9f8b7bea5344f1b0 broke netbsd's thread notifier
Diffstat (limited to 'win/tclWinThrd.c')
-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 2f2825f..dc9f082 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -481,52 +481,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 @@ -651,17 +605,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); } } |