You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by INOUE Seiichiro <in...@ariel-networks.com> on 2003/02/24 09:17:41 UTC

[PATCH] locks/win32/thread_cond.c

Hi,

This is a simple patch as follows.
This is fixed by OHTANI Hiroki <oh...@ariel-networks.com>.

Index: thread_cond.c
===================================================================
RCS file: /home/cvspublic/apr/locks/win32/thread_cond.c,v
retrieving revision 1.11
diff -u -r1.11 thread_cond.c
--- thread_cond.c	6 Jan 2003 23:44:31 -0000	1.11
+++ thread_cond.c	24 Feb 2003 08:10:18 -0000
@@ -144,6 +144,7 @@
             ReleaseMutex(cond->mutex);
             if (res == WAIT_TIMEOUT) {
                 rv = APR_TIMEUP;
+                apr_thread_mutex_lock(mutex);
             }
             return rv;
         }

Thanks.
- INOUE Seiichiro <in...@ariel-networks.com>

Re: [PATCH] locks/win32/thread_cond.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
The patch was essentially right, but we need to always fix that
mutex (not only for timeup) and return an os error if we failed for
some reason other than timeup.

The modified patch is committed.  Thanks for forwarding this patch!

Bill



At 02:17 AM 2/24/2003, INOUE Seiichiro wrote:
>Hi,
>
>This is a simple patch as follows.
>This is fixed by OHTANI Hiroki <oh...@ariel-networks.com>.
>
>Index: thread_cond.c
>===================================================================
>RCS file: /home/cvspublic/apr/locks/win32/thread_cond.c,v
>retrieving revision 1.11
>diff -u -r1.11 thread_cond.c
>--- thread_cond.c       6 Jan 2003 23:44:31 -0000       1.11
>+++ thread_cond.c       24 Feb 2003 08:10:18 -0000
>@@ -144,6 +144,7 @@
>             ReleaseMutex(cond->mutex);
>             if (res == WAIT_TIMEOUT) {
>                 rv = APR_TIMEUP;
>+                apr_thread_mutex_lock(mutex);
>             }
>             return rv;
>         }
>
>Thanks.
>- INOUE Seiichiro <in...@ariel-networks.com>