Tcl Source Code

Artifact [9b8ad4201e]
Login

Artifact 9b8ad4201e8b554f6e52158abe3e72e77dcb16c6:

Attachment "thr3.patch" to ticket [2511420fff] added by ferrieux 2009-05-04 06:17:17.
Index: generic/threadSpCmd.c
===================================================================
RCS file: /cvsroot/tcl/thread/generic/threadSpCmd.c,v
retrieving revision 1.28
diff -u -r1.28 threadSpCmd.c
--- generic/threadSpCmd.c	3 Dec 2008 20:55:35 -0000	1.28
+++ generic/threadSpCmd.c	3 May 2009 23:02:03 -0000
@@ -469,6 +469,7 @@
     switch ((enum options)opt) {
     case w_RLOCK:
         if (!Sp_ReadWriteMutexRLock(rwPtr)) {
+            PutMutex(mutexPtr);
             Tcl_AppendResult(interp, "read-locking already write-locked mutex ",
                              "from the same thread", NULL);
             return TCL_ERROR;