apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject cvs commit: apr/locks/unix thread_mutex.c
Date Tue, 20 Jul 2004 18:10:18 GMT
gregames    2004/07/20 11:10:18

  Modified:    locks/unix Tag: APR_0_9_BRANCH thread_mutex.c
  Log:
  thread id is not always a scalar
  
  backport Jeff's r1.22 fix from HEAD to apr 0.9
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.20.2.2  +3 -1      apr/locks/unix/thread_mutex.c
  
  Index: thread_mutex.c
  ===================================================================
  RCS file: /home/cvs/apr/locks/unix/thread_mutex.c,v
  retrieving revision 1.20.2.1
  retrieving revision 1.20.2.2
  diff -u -d -b -u -r1.20.2.1 -r1.20.2.2
  --- thread_mutex.c	13 Feb 2004 09:33:48 -0000	1.20.2.1
  +++ thread_mutex.c	20 Jul 2004 18:10:18 -0000	1.20.2.2
  @@ -160,6 +160,8 @@
       return rv;
   }
   
  +static apr_os_thread_t invalid_thread_id; /* all zeroes */
  +
   APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)
   {
       apr_status_t status;
  @@ -178,7 +180,7 @@
   
               if (apr_atomic_dec(&mutex->owner_ref) != 0)
                   return APR_SUCCESS;
  -            mutex->owner = 0;
  +            mutex->owner = invalid_thread_id;
           }
           /*
            * This should never occur, and indicates an application error
  
  
  

Mime
View raw message