diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-07-19 17:34:19 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-07-19 17:34:19 (GMT) |
commit | 3e161c198c18e6765aa0b057c0ad61f8916d4cf4 (patch) | |
tree | 05de5440815f8beaef293efe882f808d59892985 /generic | |
parent | ce1d17821fa4d5f332ec9806f0c525d1241a8354 (diff) | |
download | tcl-bug_3544685.zip tcl-bug_3544685.tar.gz tcl-bug_3544685.tar.bz2 |
Fix for 3544685: Threaded build failures on OpenBSD-currentbug_3544685
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclTest.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c index ab0c6cb..bb38dea 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -821,6 +821,7 @@ TestasyncCmd( Tcl_SetResult(interp, buf, TCL_VOLATILE); } else if (strcmp(argv[1], "delete") == 0) { if (argc == 2) { + Tcl_MutexLock(&asyncTestMutex); while (firstHandler != NULL) { asyncPtr = firstHandler; firstHandler = asyncPtr->nextPtr; @@ -828,6 +829,7 @@ TestasyncCmd( ckfree(asyncPtr->command); ckfree((char *) asyncPtr); } + Tcl_MutexUnlock(&asyncTestMutex); return TCL_OK; } if (argc != 3) { @@ -836,6 +838,7 @@ TestasyncCmd( if (Tcl_GetInt(interp, argv[2], &id) != TCL_OK) { return TCL_ERROR; } + Tcl_MutexLock(&asyncTestMutex); for (prevPtr = NULL, asyncPtr = firstHandler; asyncPtr != NULL; prevPtr = asyncPtr, asyncPtr = asyncPtr->nextPtr) { if (asyncPtr->id != id) { |