apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: apr CHANGES
Date Fri, 24 Sep 2004 23:18:06 GMT
stas        2004/09/24 16:18:06

  Modified:    file_io/win32 filedup.c
               .        CHANGES
  Log:
  fix apr_file_dup and apr_file_dup2 win32 implementations
  to create a mutex
  Submitted by:	Steve Hay <steve.hay uk.radan.com>
  Reviewed by:	stas
  
  Revision  Changes    Path
  1.58      +14 -0     apr/file_io/win32/filedup.c
  
  Index: filedup.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/win32/filedup.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -u -r1.57 -r1.58
  --- filedup.c	13 Feb 2004 09:38:26 -0000	1.57
  +++ filedup.c	24 Sep 2004 23:18:06 -0000	1.58
  @@ -44,6 +44,13 @@
       (*new_file)->buffered = FALSE;
       (*new_file)->ungetchar = old_file->ungetchar;
   
  +#if APR_HAS_THREADS
  +    if (old_file->mutex) {
  +        apr_thread_mutex_create(&((*new_file)->mutex),
  +                                APR_THREAD_MUTEX_DEFAULT, p);
  +    }
  +#endif
  +
       apr_pool_cleanup_register((*new_file)->pool, (void *)(*new_file), file_cleanup,
                           apr_pool_cleanup_null);
   
  @@ -117,6 +124,13 @@
       new_file->append = old_file->append;
       new_file->buffered = FALSE;
       new_file->ungetchar = old_file->ungetchar;
  +
  +#if APR_HAS_THREADS
  +    if (old_file->mutex) {
  +        apr_thread_mutex_create(&(new_file->mutex),
  +                                APR_THREAD_MUTEX_DEFAULT, p);
  +    }
  +#endif
   
       return APR_SUCCESS;
   #endif /* !defined(_WIN32_WCE) */
  
  
  
  1.492     +3 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.491
  retrieving revision 1.492
  diff -u -u -r1.491 -r1.492
  --- CHANGES	19 Sep 2004 19:15:12 -0000	1.491
  +++ CHANGES	24 Sep 2004 23:18:06 -0000	1.492
  @@ -1,5 +1,8 @@
   Changes for APR 1.1 [Deferring these features when 1.0 is rolled out.]
   
  +  *) fix apr_file_dup and apr_file_dup2 win32 implementations
  +     to create a mutex [Steve Hay <steve.hay uk.radan.com>]
  +
     *) Makes the threads to behave like on posix. If the thread is created
        without APR_DETACH expect that the thread_join will be called, so don't
        close the handle in advance, if the thread has already finished.
  
  
  

Mime
View raw message