apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/threadproc/unix thread.c
Date Mon, 27 Aug 2001 10:48:05 GMT
trawick     01/08/27 03:48:05

  Modified:    threadproc/unix thread.c
  Log:
  PTHREAD_ONCE_INIT is for initialization, not arbitrary assignment
  (cc on Tru64 is happier now)
  
  Revision  Changes    Path
  1.47      +3 -1      apr/threadproc/unix/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/unix/thread.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- thread.c	2001/08/27 03:17:15	1.46
  +++ thread.c	2001/08/27 10:48:05	1.47
  @@ -258,7 +258,9 @@
   APR_DECLARE(apr_status_t) apr_thread_once_init(apr_thread_once_t **control,
                                                  apr_pool_t *p)
   {
  -    (*control)->once = PTHREAD_ONCE_INIT;
  +    static const pthread_once_t once_init = PTHREAD_ONCE_INIT;
  +
  +    (*control)->once = once_init;
       return APR_SUCCESS;
   }
   
  
  
  

Mime
View raw message