apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/locks/win32 thread_cond.c
Date Thu, 27 Feb 2003 19:20:24 GMT
wrowe       2003/02/27 11:20:24

  Modified:    locks/win32 thread_cond.c
  Log:
    Fix two problems in apr_thread_cond_timedwait, the first observed by
    Ohtani Hiroki <ohtani@ariel-networks.com> that we failed to relock
    on failure, and the second problem I found that we weren't returning
    an error status when we failed for something other than timeup.
  
  Revision  Changes    Path
  1.12      +3 -2      apr/locks/win32/thread_cond.c
  
  Index: thread_cond.c
  ===================================================================
  RCS file: /home/cvs/apr/locks/win32/thread_cond.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- thread_cond.c	6 Jan 2003 23:44:31 -0000	1.11
  +++ thread_cond.c	27 Feb 2003 19:20:24 -0000	1.12
  @@ -142,10 +142,11 @@
           if (res != WAIT_OBJECT_0) {
               apr_status_t rv = apr_get_os_error();
               ReleaseMutex(cond->mutex);
  +            apr_thread_mutex_lock(mutex);
               if (res == WAIT_TIMEOUT) {
  -                rv = APR_TIMEUP;
  +                return APR_TIMEUP;
               }
  -            return rv;
  +            return apr_get_os_error();
           }
           if (cond->signal_all) {
               if (cond->num_waiting == 0) {
  
  
  

Mime
View raw message